---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../modules.md) / [docs](../index.md) / loadSearchIndex

# Function: loadSearchIndex()

> **loadSearchIndex**(): [`SearchIndex`](../interfaces/SearchIndex.md)

Defined in: [packages/b2c-tooling-sdk/src/docs/search.ts:22](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/e7c16f1ae423da0aa47b3e10be88f9770b53619b/packages/b2c-tooling-sdk/src/docs/search.ts#L22)

Loads the pre-built search index from the bundled data directory.

## Returns

[`SearchIndex`](../interfaces/SearchIndex.md)

The search index with all documentation entries

## Throws

Error if the index file cannot be read
