> For the complete documentation index, see [llms.txt](https://developer.emporix.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.emporix.io/api-references/readme/api-reference-33/search-indexes.md). Agents can also search and read this documentation through its [MCP server](https://developer.emporix.io/~gitbook/mcp).

# Search Indexes

## Retrieving all search indexes

> !\[Preview]\(<https://res.cloudinary.com/saas-ag/image/upload/v1752824268/emporix/icons/preview\\_api1.png)\\>
> \
> {% hint style="danger" %}\
> This functionality is in preview mode - some of the features may not be fully operational yet.\
> {% endhint %}\
> \
> Retrieves the search indexes for every searchable type on the tenant: custom schema types, \`customer\`, and \`legal-entity\`. Each item includes \`type\`.\
> \
> When \`sort\` is omitted, indexes are ordered by \`metadata.createdAt\` descending. When the \`X-Total-Count\` request header is \`true\`, the response includes the \`X-Total-Count\` header with the number of indexes. The response body stays an array.

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["search.search_read"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"search.search_read":"Needed to search documents, to read saved searches, and to read search indexes and index jobs.","search.search_manage":"Needed to create, update, and delete saved searches and search indexes.","schema.custominstance_read":"Needed to read every custom entity instance. When this scope is absent, `custom.{type}_read` or `custom.{type}_read_own` can still allow the search.","customer.customer_read":"Needed to search every customer. A restricted form such as `customer.customer_read--DE#AT` returns only customers whose `restriction` matches one of the listed values.","customer.customer_read_own":"Needed to search only the caller's own customer.","customermanagement.legalentity_read":"Needed to search every legal entity. A restricted form such as `customermanagement.legalentity_read--DE#AT` returns only legal entities whose `restrictions` contain one of the listed values.","customermanagement.legalentity_read_own":"Needed to search only the caller's own legal entity."}}}}},"parameters":{"query_pageNumber":{"name":"pageNumber","in":"query","description":"Page number to be retrieved. The number of the first page is 1.\n","schema":{"default":1,"minimum":1,"type":"integer"}},"query_pageSize":{"name":"pageSize","in":"query","description":"Number of items to be retrieved per page.","schema":{"default":60,"minimum":1,"maximum":2000,"type":"integer"}},"query_sort_createdAt":{"name":"sort","in":"query","description":"Comma-separated list of properties used to sort the results. The order of properties indicates their priority.\n\nPossible values:\n\n* `{fieldName}`\n* `{fieldName}:ASC`\n* `{fieldName}:DESC`\n\nWhen the direction is omitted, the field is sorted in ascending order. When `sort` is omitted, results are ordered by `metadata.createdAt` descending.","schema":{"type":"string"}},"query_q":{"name":"q","in":"query","description":"A standard query parameter is used to search for specific values.\n\nSee: [Standard practises - Query parameter](https://developer.emporix.io/api-documentation/standard-practices/q-param)","schema":{"type":"string"}},"query_fields_index":{"name":"fields","in":"query","description":"Comma-separated list of index properties to return. When the parameter is omitted, the index is returned in full.","schema":{"type":"string"}},"header_Accept-Language":{"name":"Accept-Language","in":"header","required":false,"schema":{"type":"string"},"description":"List of language codes acceptable for the response.\n\n* If the header is set to a language or a list of languages, the service returns the first requested language that has a translation. Localized fields are maps with that language code as the key.\n* If the header is set to `*`, localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages.\n* If the header is empty, localized fields are retrieved as maps containing a single translation, where the key is a language code and the value is the field in the specified language. The endpoint assumes that localized fields are to be retrieved in the tenant's default language defined in the Configuration Service.\n* If none of the requested languages has a translation, the localized fields are omitted from the response.\n"},"header_X-Total-Count":{"name":"X-Total-Count","in":"header","required":false,"description":"Flag indicating whether the total count of retrieved items should be returned.","schema":{"default":false,"type":"boolean"}}},"schemas":{"SearchIndex":{"type":"object","description":"A search index.","properties":{"id":{"type":"string","description":"Index id."},"type":{"type":"string","description":"Type this index belongs to. A custom schema type, `customer`, or `legal-entity`."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized name. A specific `Accept-Language` value keeps one language. `*` keeps every stored language."},"description":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized description. A specific `Accept-Language` value keeps one language. `*` keeps every stored language."},"fields":{"type":"array","description":"Fields stored for this index.","items":{"$ref":"#/components/schemas/IndexField"}},"analyzers":{"type":"array","description":"Text comparison rules stored for this index. Omitted when the index has none.","items":{"$ref":"#/components/schemas/IndexAnalyzer"}},"status":{"type":"string","description":"Build state of the index.","enum":["building","ready","failed"]},"metadata":{"$ref":"#/components/schemas/ResourceMetadata"}}},"IndexField":{"type":"object","description":"One field in a search index.","properties":{"path":{"type":"string","description":"Full stored field path. Use `name.en`, not `name`."},"text":{"type":"boolean","description":"Indexes a string for `TEXT` and `PHRASE` search, and for `WILDCARD` on the whole stored value. A wildcard match keeps the stored case."},"autocomplete":{"type":"string","description":"Indexes a string for `AUTOCOMPLETE`. `PREFIX` matches the start of a word. `NGRAM` matches a character sequence inside a word.","enum":["PREFIX","NGRAM"]},"exact":{"type":"boolean","description":"Indexes the field for equality, list, range, existence, and sort. Required for number, boolean, and date fields."},"analyzer":{"type":"string","description":"Comparison rules for a string field with `text` set to `true`. Use a preset (`STANDARD`, `FOLDED`, `IDENTIFIER`, `SOUNDS_LIKE`) or the `name` of an analyzer on the index. When omitted, `STANDARD` is used."},"additionalAnalyzers":{"type":"array","maxItems":3,"description":"Extra comparison rules for the same field. Each entry is a preset or the `name` of an analyzer on the index. A query uses one only when it selects it. Requires `text` set to `true`.","items":{"type":"string"}},"itemFields":{"type":"array","description":"Fields inside one list of objects. `path` is that list. The catalog `parent` of each child must be this path. Matching within one list item uses these fields. Do not set `text`, `autocomplete`, `exact`, or `analyzer` on the list itself.","items":{"$ref":"#/components/schemas/IndexField"}}},"required":["path"]},"IndexAnalyzer":{"type":"object","description":"Rules for comparing text. The service applies the same rules to the stored value and to the query. Unknown properties are ignored.\n\n`basedOn` starts from a preset. A property you set replaces that preset's value. `STANDARD` compares words and ignores case. `FOLDED` also ignores accents. `IDENTIFIER` compares the whole value, ignores case, and removes spaces, `-`, `.`, and `/`. `SOUNDS_LIKE` matches words that sound alike.","properties":{"name":{"type":"string","description":"Analyzer name. A letter, then up to 39 letters, digits, underscores, or hyphens. Preset names, `keyword`, and `folded` are reserved."},"basedOn":{"type":"string","description":"Preset these rules start from.","enum":["STANDARD","FOLDED","IDENTIFIER","SOUNDS_LIKE"]},"split":{"type":"string","description":"`WORDS` compares word by word. `WHOLE_VALUE` compares the whole value as one token.","enum":["WORDS","WHOLE_VALUE"]},"ignoreCase":{"type":"boolean","description":"If set to `true`, upper and lower case are treated as equal."},"ignoreAccents":{"type":"boolean","description":"If set to `true`, letters with and without accents are treated as equal."},"ignoreCharacters":{"type":"array","maxItems":20,"description":"Characters removed before comparing. Each entry is one character.","items":{"type":"string","minLength":1,"maxLength":1}},"ignoreWords":{"type":"array","maxItems":200,"description":"Words ignored when comparing. With `WORDS`, each word contains only letters and digits, is at most 50 characters, and must stay one word when text is split. For example, `中文` is two words.","items":{"type":"string","maxLength":50}},"compare":{"type":"string","description":"`SPELLING` compares the letters. `SOUND` matches words that sound alike.","enum":["SPELLING","SOUND"]}},"required":["name"]},"ResourceMetadata":{"type":"object","description":"Version and timestamps for a stored resource.","properties":{"version":{"type":"integer","description":"Stored version. The first version is 1."},"createdAt":{"type":"string","format":"date-time","description":"Time when the resource was created."},"modifiedAt":{"type":"string","format":"date-time","description":"Time when the resource was last modified."}}},"ErrorMessageFault":{"type":"object","description":"Authorization error returned by the API gateway.","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string","description":"Authorization failure."},"detail":{"type":"object","properties":{"errorcode":{"type":"string","description":"Gateway error code."}}}}}}},"ErrorMessage":{"type":"object","description":"Error returned for a failed request.","properties":{"code":{"type":"integer","description":"HTTP status code."},"status":{"type":"string","description":"HTTP status code as text."},"message":{"type":"string","description":"Explanation of the failure."},"details":{"type":"array","description":"Field-level or scope-level messages, when the failure has more than one part.","items":{"type":"object","properties":{"message":{"type":"string","description":"One part of the failure."}}}}}}},"responses":{"401_resp_common":{"description":"The authorization token is invalid or has expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageFault"}}}},"403_search_read":{"description":"The access token does not include `search.search_read`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500_resp_common":{"description":"A server-side error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}},"paths":{"/search/{tenant}/search/indexes":{"get":{"summary":"Retrieving all search indexes","operationId":"GET-search-tenant-indexes","tags":["Search Indexes"],"description":"![Preview](https://res.cloudinary.com/saas-ag/image/upload/v1752824268/emporix/icons/preview_api1.png)\n\n{% hint style=\"danger\" %}\nThis functionality is in preview mode - some of the features may not be fully operational yet.\n{% endhint %}\n\nRetrieves the search indexes for every searchable type on the tenant: custom schema types, `customer`, and `legal-entity`. Each item includes `type`.\n\nWhen `sort` is omitted, indexes are ordered by `metadata.createdAt` descending. When the `X-Total-Count` request header is `true`, the response includes the `X-Total-Count` header with the number of indexes. The response body stays an array.","parameters":[{"$ref":"#/components/parameters/query_pageNumber"},{"$ref":"#/components/parameters/query_pageSize"},{"$ref":"#/components/parameters/query_sort_createdAt"},{"$ref":"#/components/parameters/query_q"},{"$ref":"#/components/parameters/query_fields_index"},{"$ref":"#/components/parameters/header_Accept-Language"},{"$ref":"#/components/parameters/header_X-Total-Count"}],"responses":{"200":{"description":"The request succeeded. The body is the current page of indexes.","headers":{"X-Total-Count":{"description":"Number of indexes. Present only when the request `X-Total-Count` header is `true`.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SearchIndex"}}}}},"401":{"$ref":"#/components/responses/401_resp_common"},"403":{"$ref":"#/components/responses/403_search_read"},"500":{"$ref":"#/components/responses/500_resp_common"}}}}}}
```

## Retrieving search indexes

> !\[Preview]\(<https://res.cloudinary.com/saas-ag/image/upload/v1752824268/emporix/icons/preview\\_api1.png)\\>
> \
> {% hint style="danger" %}\
> This functionality is in preview mode - some of the features may not be fully operational yet.\
> {% endhint %}\
> \
> Retrieves the search indexes for one type.\
> \
> When \`sort\` is omitted, indexes are ordered by \`metadata.createdAt\` descending. When the \`X-Total-Count\` request header is \`true\`, the response includes the \`X-Total-Count\` header with the number of indexes. The response body stays an array.

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["search.search_read"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"search.search_read":"Needed to search documents, to read saved searches, and to read search indexes and index jobs.","search.search_manage":"Needed to create, update, and delete saved searches and search indexes.","schema.custominstance_read":"Needed to read every custom entity instance. When this scope is absent, `custom.{type}_read` or `custom.{type}_read_own` can still allow the search.","customer.customer_read":"Needed to search every customer. A restricted form such as `customer.customer_read--DE#AT` returns only customers whose `restriction` matches one of the listed values.","customer.customer_read_own":"Needed to search only the caller's own customer.","customermanagement.legalentity_read":"Needed to search every legal entity. A restricted form such as `customermanagement.legalentity_read--DE#AT` returns only legal entities whose `restrictions` contain one of the listed values.","customermanagement.legalentity_read_own":"Needed to search only the caller's own legal entity."}}}}},"parameters":{"query_pageNumber":{"name":"pageNumber","in":"query","description":"Page number to be retrieved. The number of the first page is 1.\n","schema":{"default":1,"minimum":1,"type":"integer"}},"query_pageSize":{"name":"pageSize","in":"query","description":"Number of items to be retrieved per page.","schema":{"default":60,"minimum":1,"maximum":2000,"type":"integer"}},"query_sort_createdAt":{"name":"sort","in":"query","description":"Comma-separated list of properties used to sort the results. The order of properties indicates their priority.\n\nPossible values:\n\n* `{fieldName}`\n* `{fieldName}:ASC`\n* `{fieldName}:DESC`\n\nWhen the direction is omitted, the field is sorted in ascending order. When `sort` is omitted, results are ordered by `metadata.createdAt` descending.","schema":{"type":"string"}},"query_q":{"name":"q","in":"query","description":"A standard query parameter is used to search for specific values.\n\nSee: [Standard practises - Query parameter](https://developer.emporix.io/api-documentation/standard-practices/q-param)","schema":{"type":"string"}},"query_fields_index":{"name":"fields","in":"query","description":"Comma-separated list of index properties to return. When the parameter is omitted, the index is returned in full.","schema":{"type":"string"}},"header_Accept-Language":{"name":"Accept-Language","in":"header","required":false,"schema":{"type":"string"},"description":"List of language codes acceptable for the response.\n\n* If the header is set to a language or a list of languages, the service returns the first requested language that has a translation. Localized fields are maps with that language code as the key.\n* If the header is set to `*`, localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages.\n* If the header is empty, localized fields are retrieved as maps containing a single translation, where the key is a language code and the value is the field in the specified language. The endpoint assumes that localized fields are to be retrieved in the tenant's default language defined in the Configuration Service.\n* If none of the requested languages has a translation, the localized fields are omitted from the response.\n"},"header_X-Total-Count":{"name":"X-Total-Count","in":"header","required":false,"description":"Flag indicating whether the total count of retrieved items should be returned.","schema":{"default":false,"type":"boolean"}}},"schemas":{"SearchIndex":{"type":"object","description":"A search index.","properties":{"id":{"type":"string","description":"Index id."},"type":{"type":"string","description":"Type this index belongs to. A custom schema type, `customer`, or `legal-entity`."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized name. A specific `Accept-Language` value keeps one language. `*` keeps every stored language."},"description":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized description. A specific `Accept-Language` value keeps one language. `*` keeps every stored language."},"fields":{"type":"array","description":"Fields stored for this index.","items":{"$ref":"#/components/schemas/IndexField"}},"analyzers":{"type":"array","description":"Text comparison rules stored for this index. Omitted when the index has none.","items":{"$ref":"#/components/schemas/IndexAnalyzer"}},"status":{"type":"string","description":"Build state of the index.","enum":["building","ready","failed"]},"metadata":{"$ref":"#/components/schemas/ResourceMetadata"}}},"IndexField":{"type":"object","description":"One field in a search index.","properties":{"path":{"type":"string","description":"Full stored field path. Use `name.en`, not `name`."},"text":{"type":"boolean","description":"Indexes a string for `TEXT` and `PHRASE` search, and for `WILDCARD` on the whole stored value. A wildcard match keeps the stored case."},"autocomplete":{"type":"string","description":"Indexes a string for `AUTOCOMPLETE`. `PREFIX` matches the start of a word. `NGRAM` matches a character sequence inside a word.","enum":["PREFIX","NGRAM"]},"exact":{"type":"boolean","description":"Indexes the field for equality, list, range, existence, and sort. Required for number, boolean, and date fields."},"analyzer":{"type":"string","description":"Comparison rules for a string field with `text` set to `true`. Use a preset (`STANDARD`, `FOLDED`, `IDENTIFIER`, `SOUNDS_LIKE`) or the `name` of an analyzer on the index. When omitted, `STANDARD` is used."},"additionalAnalyzers":{"type":"array","maxItems":3,"description":"Extra comparison rules for the same field. Each entry is a preset or the `name` of an analyzer on the index. A query uses one only when it selects it. Requires `text` set to `true`.","items":{"type":"string"}},"itemFields":{"type":"array","description":"Fields inside one list of objects. `path` is that list. The catalog `parent` of each child must be this path. Matching within one list item uses these fields. Do not set `text`, `autocomplete`, `exact`, or `analyzer` on the list itself.","items":{"$ref":"#/components/schemas/IndexField"}}},"required":["path"]},"IndexAnalyzer":{"type":"object","description":"Rules for comparing text. The service applies the same rules to the stored value and to the query. Unknown properties are ignored.\n\n`basedOn` starts from a preset. A property you set replaces that preset's value. `STANDARD` compares words and ignores case. `FOLDED` also ignores accents. `IDENTIFIER` compares the whole value, ignores case, and removes spaces, `-`, `.`, and `/`. `SOUNDS_LIKE` matches words that sound alike.","properties":{"name":{"type":"string","description":"Analyzer name. A letter, then up to 39 letters, digits, underscores, or hyphens. Preset names, `keyword`, and `folded` are reserved."},"basedOn":{"type":"string","description":"Preset these rules start from.","enum":["STANDARD","FOLDED","IDENTIFIER","SOUNDS_LIKE"]},"split":{"type":"string","description":"`WORDS` compares word by word. `WHOLE_VALUE` compares the whole value as one token.","enum":["WORDS","WHOLE_VALUE"]},"ignoreCase":{"type":"boolean","description":"If set to `true`, upper and lower case are treated as equal."},"ignoreAccents":{"type":"boolean","description":"If set to `true`, letters with and without accents are treated as equal."},"ignoreCharacters":{"type":"array","maxItems":20,"description":"Characters removed before comparing. Each entry is one character.","items":{"type":"string","minLength":1,"maxLength":1}},"ignoreWords":{"type":"array","maxItems":200,"description":"Words ignored when comparing. With `WORDS`, each word contains only letters and digits, is at most 50 characters, and must stay one word when text is split. For example, `中文` is two words.","items":{"type":"string","maxLength":50}},"compare":{"type":"string","description":"`SPELLING` compares the letters. `SOUND` matches words that sound alike.","enum":["SPELLING","SOUND"]}},"required":["name"]},"ResourceMetadata":{"type":"object","description":"Version and timestamps for a stored resource.","properties":{"version":{"type":"integer","description":"Stored version. The first version is 1."},"createdAt":{"type":"string","format":"date-time","description":"Time when the resource was created."},"modifiedAt":{"type":"string","format":"date-time","description":"Time when the resource was last modified."}}},"ErrorMessageFault":{"type":"object","description":"Authorization error returned by the API gateway.","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string","description":"Authorization failure."},"detail":{"type":"object","properties":{"errorcode":{"type":"string","description":"Gateway error code."}}}}}}},"ErrorMessage":{"type":"object","description":"Error returned for a failed request.","properties":{"code":{"type":"integer","description":"HTTP status code."},"status":{"type":"string","description":"HTTP status code as text."},"message":{"type":"string","description":"Explanation of the failure."},"details":{"type":"array","description":"Field-level or scope-level messages, when the failure has more than one part.","items":{"type":"object","properties":{"message":{"type":"string","description":"One part of the failure."}}}}}}},"responses":{"401_resp_common":{"description":"The authorization token is invalid or has expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageFault"}}}},"403_search_read":{"description":"The access token does not include `search.search_read`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500_resp_common":{"description":"A server-side error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}},"paths":{"/search/{tenant}/search/{type}/indexes":{"get":{"summary":"Retrieving search indexes","operationId":"GET-search-tenant-type-indexes","tags":["Search Indexes"],"description":"![Preview](https://res.cloudinary.com/saas-ag/image/upload/v1752824268/emporix/icons/preview_api1.png)\n\n{% hint style=\"danger\" %}\nThis functionality is in preview mode - some of the features may not be fully operational yet.\n{% endhint %}\n\nRetrieves the search indexes for one type.\n\nWhen `sort` is omitted, indexes are ordered by `metadata.createdAt` descending. When the `X-Total-Count` request header is `true`, the response includes the `X-Total-Count` header with the number of indexes. The response body stays an array.","parameters":[{"$ref":"#/components/parameters/query_pageNumber"},{"$ref":"#/components/parameters/query_pageSize"},{"$ref":"#/components/parameters/query_sort_createdAt"},{"$ref":"#/components/parameters/query_q"},{"$ref":"#/components/parameters/query_fields_index"},{"$ref":"#/components/parameters/header_Accept-Language"},{"$ref":"#/components/parameters/header_X-Total-Count"}],"responses":{"200":{"description":"The request succeeded. The body is the current page of indexes.","headers":{"X-Total-Count":{"description":"Number of indexes. Present only when the request `X-Total-Count` header is `true`.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SearchIndex"}}}}},"401":{"$ref":"#/components/responses/401_resp_common"},"403":{"$ref":"#/components/responses/403_search_read"},"500":{"$ref":"#/components/responses/500_resp_common"}}}}}}
```

## Retrieving a search index

> !\[Preview]\(<https://res.cloudinary.com/saas-ag/image/upload/v1752824268/emporix/icons/preview\\_api1.png)\\>
> \
> {% hint style="danger" %}\
> This functionality is in preview mode - some of the features may not be fully operational yet.\
> {% endhint %}\
> \
> Retrieves one search index.

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["search.search_read"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"search.search_read":"Needed to search documents, to read saved searches, and to read search indexes and index jobs.","search.search_manage":"Needed to create, update, and delete saved searches and search indexes.","schema.custominstance_read":"Needed to read every custom entity instance. When this scope is absent, `custom.{type}_read` or `custom.{type}_read_own` can still allow the search.","customer.customer_read":"Needed to search every customer. A restricted form such as `customer.customer_read--DE#AT` returns only customers whose `restriction` matches one of the listed values.","customer.customer_read_own":"Needed to search only the caller's own customer.","customermanagement.legalentity_read":"Needed to search every legal entity. A restricted form such as `customermanagement.legalentity_read--DE#AT` returns only legal entities whose `restrictions` contain one of the listed values.","customermanagement.legalentity_read_own":"Needed to search only the caller's own legal entity."}}}}},"parameters":{"query_fields_index":{"name":"fields","in":"query","description":"Comma-separated list of index properties to return. When the parameter is omitted, the index is returned in full.","schema":{"type":"string"}},"header_Accept-Language":{"name":"Accept-Language","in":"header","required":false,"schema":{"type":"string"},"description":"List of language codes acceptable for the response.\n\n* If the header is set to a language or a list of languages, the service returns the first requested language that has a translation. Localized fields are maps with that language code as the key.\n* If the header is set to `*`, localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages.\n* If the header is empty, localized fields are retrieved as maps containing a single translation, where the key is a language code and the value is the field in the specified language. The endpoint assumes that localized fields are to be retrieved in the tenant's default language defined in the Configuration Service.\n* If none of the requested languages has a translation, the localized fields are omitted from the response.\n"}},"schemas":{"SearchIndex":{"type":"object","description":"A search index.","properties":{"id":{"type":"string","description":"Index id."},"type":{"type":"string","description":"Type this index belongs to. A custom schema type, `customer`, or `legal-entity`."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized name. A specific `Accept-Language` value keeps one language. `*` keeps every stored language."},"description":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized description. A specific `Accept-Language` value keeps one language. `*` keeps every stored language."},"fields":{"type":"array","description":"Fields stored for this index.","items":{"$ref":"#/components/schemas/IndexField"}},"analyzers":{"type":"array","description":"Text comparison rules stored for this index. Omitted when the index has none.","items":{"$ref":"#/components/schemas/IndexAnalyzer"}},"status":{"type":"string","description":"Build state of the index.","enum":["building","ready","failed"]},"metadata":{"$ref":"#/components/schemas/ResourceMetadata"}}},"IndexField":{"type":"object","description":"One field in a search index.","properties":{"path":{"type":"string","description":"Full stored field path. Use `name.en`, not `name`."},"text":{"type":"boolean","description":"Indexes a string for `TEXT` and `PHRASE` search, and for `WILDCARD` on the whole stored value. A wildcard match keeps the stored case."},"autocomplete":{"type":"string","description":"Indexes a string for `AUTOCOMPLETE`. `PREFIX` matches the start of a word. `NGRAM` matches a character sequence inside a word.","enum":["PREFIX","NGRAM"]},"exact":{"type":"boolean","description":"Indexes the field for equality, list, range, existence, and sort. Required for number, boolean, and date fields."},"analyzer":{"type":"string","description":"Comparison rules for a string field with `text` set to `true`. Use a preset (`STANDARD`, `FOLDED`, `IDENTIFIER`, `SOUNDS_LIKE`) or the `name` of an analyzer on the index. When omitted, `STANDARD` is used."},"additionalAnalyzers":{"type":"array","maxItems":3,"description":"Extra comparison rules for the same field. Each entry is a preset or the `name` of an analyzer on the index. A query uses one only when it selects it. Requires `text` set to `true`.","items":{"type":"string"}},"itemFields":{"type":"array","description":"Fields inside one list of objects. `path` is that list. The catalog `parent` of each child must be this path. Matching within one list item uses these fields. Do not set `text`, `autocomplete`, `exact`, or `analyzer` on the list itself.","items":{"$ref":"#/components/schemas/IndexField"}}},"required":["path"]},"IndexAnalyzer":{"type":"object","description":"Rules for comparing text. The service applies the same rules to the stored value and to the query. Unknown properties are ignored.\n\n`basedOn` starts from a preset. A property you set replaces that preset's value. `STANDARD` compares words and ignores case. `FOLDED` also ignores accents. `IDENTIFIER` compares the whole value, ignores case, and removes spaces, `-`, `.`, and `/`. `SOUNDS_LIKE` matches words that sound alike.","properties":{"name":{"type":"string","description":"Analyzer name. A letter, then up to 39 letters, digits, underscores, or hyphens. Preset names, `keyword`, and `folded` are reserved."},"basedOn":{"type":"string","description":"Preset these rules start from.","enum":["STANDARD","FOLDED","IDENTIFIER","SOUNDS_LIKE"]},"split":{"type":"string","description":"`WORDS` compares word by word. `WHOLE_VALUE` compares the whole value as one token.","enum":["WORDS","WHOLE_VALUE"]},"ignoreCase":{"type":"boolean","description":"If set to `true`, upper and lower case are treated as equal."},"ignoreAccents":{"type":"boolean","description":"If set to `true`, letters with and without accents are treated as equal."},"ignoreCharacters":{"type":"array","maxItems":20,"description":"Characters removed before comparing. Each entry is one character.","items":{"type":"string","minLength":1,"maxLength":1}},"ignoreWords":{"type":"array","maxItems":200,"description":"Words ignored when comparing. With `WORDS`, each word contains only letters and digits, is at most 50 characters, and must stay one word when text is split. For example, `中文` is two words.","items":{"type":"string","maxLength":50}},"compare":{"type":"string","description":"`SPELLING` compares the letters. `SOUND` matches words that sound alike.","enum":["SPELLING","SOUND"]}},"required":["name"]},"ResourceMetadata":{"type":"object","description":"Version and timestamps for a stored resource.","properties":{"version":{"type":"integer","description":"Stored version. The first version is 1."},"createdAt":{"type":"string","format":"date-time","description":"Time when the resource was created."},"modifiedAt":{"type":"string","format":"date-time","description":"Time when the resource was last modified."}}},"ErrorMessageFault":{"type":"object","description":"Authorization error returned by the API gateway.","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string","description":"Authorization failure."},"detail":{"type":"object","properties":{"errorcode":{"type":"string","description":"Gateway error code."}}}}}}},"ErrorMessage":{"type":"object","description":"Error returned for a failed request.","properties":{"code":{"type":"integer","description":"HTTP status code."},"status":{"type":"string","description":"HTTP status code as text."},"message":{"type":"string","description":"Explanation of the failure."},"details":{"type":"array","description":"Field-level or scope-level messages, when the failure has more than one part.","items":{"type":"object","properties":{"message":{"type":"string","description":"One part of the failure."}}}}}}},"responses":{"401_resp_common":{"description":"The authorization token is invalid or has expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageFault"}}}},"403_search_read":{"description":"The access token does not include `search.search_read`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500_resp_common":{"description":"A server-side error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}},"paths":{"/search/{tenant}/search/{type}/indexes/{id}":{"get":{"summary":"Retrieving a search index","operationId":"GET-search-tenant-type-indexes-id","tags":["Search Indexes"],"description":"![Preview](https://res.cloudinary.com/saas-ag/image/upload/v1752824268/emporix/icons/preview_api1.png)\n\n{% hint style=\"danger\" %}\nThis functionality is in preview mode - some of the features may not be fully operational yet.\n{% endhint %}\n\nRetrieves one search index.","parameters":[{"$ref":"#/components/parameters/query_fields_index"},{"$ref":"#/components/parameters/header_Accept-Language"}],"responses":{"200":{"description":"The index exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchIndex"}}}},"401":{"$ref":"#/components/responses/401_resp_common"},"403":{"$ref":"#/components/responses/403_search_read"},"404":{"description":"No index with this id exists for the type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"$ref":"#/components/responses/500_resp_common"}}}}}}
```

## Upserting a search index

> !\[Preview]\(<https://res.cloudinary.com/saas-ag/image/upload/v1752824268/emporix/icons/preview\\_api1.png)\\>
> \
> {% hint style="danger" %}\
> This functionality is in preview mode - some of the features may not be fully operational yet.\
> {% endhint %}\
> \
> Creates or updates the search index identified by \`{id}\` for one type: a custom schema type, \`customer\`, or \`legal-entity\`. Unknown properties in the body are ignored.\
> \
> A new index returns \`202 Accepted\` and the id of a job that builds the index. Saving an index whose status is \`building\` or \`failed\`, or whose field definition changed, also returns \`202 Accepted\` and starts an update job. Analyzers are part of that definition. An index whose status is \`ready\` and whose field definition is unchanged returns \`204 No Content\` and does not start a job. \`name\` and \`description\` can still change in that case. A job that is already in progress for this index returns \`409 Conflict\`.\
> \
> \`metadata\` can be omitted when the index is created and when it is updated. A missing \`metadata.version\` still updates an existing index. When \`metadata.version\` is sent, it is the optimistic lock: a value that does not match the stored index returns \`409 Conflict\`.

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["search.search_manage"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"search.search_read":"Needed to search documents, to read saved searches, and to read search indexes and index jobs.","search.search_manage":"Needed to create, update, and delete saved searches and search indexes.","schema.custominstance_read":"Needed to read every custom entity instance. When this scope is absent, `custom.{type}_read` or `custom.{type}_read_own` can still allow the search.","customer.customer_read":"Needed to search every customer. A restricted form such as `customer.customer_read--DE#AT` returns only customers whose `restriction` matches one of the listed values.","customer.customer_read_own":"Needed to search only the caller's own customer.","customermanagement.legalentity_read":"Needed to search every legal entity. A restricted form such as `customermanagement.legalentity_read--DE#AT` returns only legal entities whose `restrictions` contain one of the listed values.","customermanagement.legalentity_read_own":"Needed to search only the caller's own legal entity."}}}}},"parameters":{"header_Content-Language":{"name":"Content-Language","in":"header","required":false,"description":"Language of the localized `name` and `description` in the request body. Each language key in those maps must be configured for the tenant.","schema":{"type":"string"}}},"schemas":{"IndexRequest":{"type":"object","description":"Definition of a search index. Unknown properties are ignored.","properties":{"id":{"type":"string","description":"Index id. Optional. When it is present, it must equal the `{id}` path parameter."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized name of the index."},"description":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized description of the index."},"fields":{"type":"array","description":"Fields to index. At least one field is required.\n\nA string field needs `text`, `autocomplete`, or `exact`. A number, boolean, or date field supports only `exact` set to `true`. `time`, `object`, and `dictionary` fields cannot be indexed. A list of objects is indexed with `itemFields` on `IndexField`. A path must be a field defined on the type, or `metadata.createdAt`, or `metadata.modifiedAt`. Any other path is rejected.","items":{"$ref":"#/components/schemas/IndexField"}},"analyzers":{"type":"array","maxItems":10,"description":"Named text comparison rules. Optional. Every analyzer must be selected by a field.","items":{"$ref":"#/components/schemas/IndexAnalyzer"}},"metadata":{"$ref":"#/components/schemas/IndexMetadataRequest"}},"required":["fields"]},"IndexField":{"type":"object","description":"One field in a search index.","properties":{"path":{"type":"string","description":"Full stored field path. Use `name.en`, not `name`."},"text":{"type":"boolean","description":"Indexes a string for `TEXT` and `PHRASE` search, and for `WILDCARD` on the whole stored value. A wildcard match keeps the stored case."},"autocomplete":{"type":"string","description":"Indexes a string for `AUTOCOMPLETE`. `PREFIX` matches the start of a word. `NGRAM` matches a character sequence inside a word.","enum":["PREFIX","NGRAM"]},"exact":{"type":"boolean","description":"Indexes the field for equality, list, range, existence, and sort. Required for number, boolean, and date fields."},"analyzer":{"type":"string","description":"Comparison rules for a string field with `text` set to `true`. Use a preset (`STANDARD`, `FOLDED`, `IDENTIFIER`, `SOUNDS_LIKE`) or the `name` of an analyzer on the index. When omitted, `STANDARD` is used."},"additionalAnalyzers":{"type":"array","maxItems":3,"description":"Extra comparison rules for the same field. Each entry is a preset or the `name` of an analyzer on the index. A query uses one only when it selects it. Requires `text` set to `true`.","items":{"type":"string"}},"itemFields":{"type":"array","description":"Fields inside one list of objects. `path` is that list. The catalog `parent` of each child must be this path. Matching within one list item uses these fields. Do not set `text`, `autocomplete`, `exact`, or `analyzer` on the list itself.","items":{"$ref":"#/components/schemas/IndexField"}}},"required":["path"]},"IndexAnalyzer":{"type":"object","description":"Rules for comparing text. The service applies the same rules to the stored value and to the query. Unknown properties are ignored.\n\n`basedOn` starts from a preset. A property you set replaces that preset's value. `STANDARD` compares words and ignores case. `FOLDED` also ignores accents. `IDENTIFIER` compares the whole value, ignores case, and removes spaces, `-`, `.`, and `/`. `SOUNDS_LIKE` matches words that sound alike.","properties":{"name":{"type":"string","description":"Analyzer name. A letter, then up to 39 letters, digits, underscores, or hyphens. Preset names, `keyword`, and `folded` are reserved."},"basedOn":{"type":"string","description":"Preset these rules start from.","enum":["STANDARD","FOLDED","IDENTIFIER","SOUNDS_LIKE"]},"split":{"type":"string","description":"`WORDS` compares word by word. `WHOLE_VALUE` compares the whole value as one token.","enum":["WORDS","WHOLE_VALUE"]},"ignoreCase":{"type":"boolean","description":"If set to `true`, upper and lower case are treated as equal."},"ignoreAccents":{"type":"boolean","description":"If set to `true`, letters with and without accents are treated as equal."},"ignoreCharacters":{"type":"array","maxItems":20,"description":"Characters removed before comparing. Each entry is one character.","items":{"type":"string","minLength":1,"maxLength":1}},"ignoreWords":{"type":"array","maxItems":200,"description":"Words ignored when comparing. With `WORDS`, each word contains only letters and digits, is at most 50 characters, and must stay one word when text is split. For example, `中文` is two words.","items":{"type":"string","maxLength":50}},"compare":{"type":"string","description":"`SPELLING` compares the letters. `SOUND` matches words that sound alike.","enum":["SPELLING","SOUND"]}},"required":["name"]},"IndexMetadataRequest":{"type":"object","description":"Optimistic lock for an index update. The object can be omitted on create and on update. A missing object still updates an existing index.\n\nWhen the object is sent, `version` is required. A value that does not match the stored index returns `409 Conflict`.","properties":{"version":{"type":"integer","minimum":1,"description":"Current version of the index. The first stored version is 1."}},"required":["version"]},"JobId":{"type":"object","description":"Identifier of an index job.","properties":{"id":{"type":"string","description":"Job id."}}},"ErrorMessage":{"type":"object","description":"Error returned for a failed request.","properties":{"code":{"type":"integer","description":"HTTP status code."},"status":{"type":"string","description":"HTTP status code as text."},"message":{"type":"string","description":"Explanation of the failure."},"details":{"type":"array","description":"Field-level or scope-level messages, when the failure has more than one part.","items":{"type":"object","properties":{"message":{"type":"string","description":"One part of the failure."}}}}}},"ErrorMessageFault":{"type":"object","description":"Authorization error returned by the API gateway.","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string","description":"Authorization failure."},"detail":{"type":"object","properties":{"errorcode":{"type":"string","description":"Gateway error code."}}}}}}}},"responses":{"401_resp_common":{"description":"The authorization token is invalid or has expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageFault"}}}},"403_search_manage":{"description":"The access token does not include `search.search_manage`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500_resp_common":{"description":"A server-side error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}},"paths":{"/search/{tenant}/search/{type}/indexes/{id}":{"put":{"summary":"Upserting a search index","operationId":"PUT-search-tenant-type-indexes-id","tags":["Search Indexes"],"description":"![Preview](https://res.cloudinary.com/saas-ag/image/upload/v1752824268/emporix/icons/preview_api1.png)\n\n{% hint style=\"danger\" %}\nThis functionality is in preview mode - some of the features may not be fully operational yet.\n{% endhint %}\n\nCreates or updates the search index identified by `{id}` for one type: a custom schema type, `customer`, or `legal-entity`. Unknown properties in the body are ignored.\n\nA new index returns `202 Accepted` and the id of a job that builds the index. Saving an index whose status is `building` or `failed`, or whose field definition changed, also returns `202 Accepted` and starts an update job. Analyzers are part of that definition. An index whose status is `ready` and whose field definition is unchanged returns `204 No Content` and does not start a job. `name` and `description` can still change in that case. A job that is already in progress for this index returns `409 Conflict`.\n\n`metadata` can be omitted when the index is created and when it is updated. A missing `metadata.version` still updates an existing index. When `metadata.version` is sent, it is the optimistic lock: a value that does not match the stored index returns `409 Conflict`.","parameters":[{"$ref":"#/components/parameters/header_Content-Language"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexRequest"}}}},"responses":{"202":{"description":"The index build has started. The body is the job id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobId"}}}},"204":{"description":"The index is already ready and the field definition is unchanged. No job was started."},"400":{"description":"The index id or field list is invalid, or `metadata.version` is below 1.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"401":{"$ref":"#/components/responses/401_resp_common"},"403":{"$ref":"#/components/responses/403_search_manage"},"409":{"description":"An index job is already in progress, or `metadata.version` does not match the stored index.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"$ref":"#/components/responses/500_resp_common"}}}}}}
```

## Deleting a search index

> !\[Preview]\(<https://res.cloudinary.com/saas-ag/image/upload/v1752824268/emporix/icons/preview\\_api1.png)\\>
> \
> {% hint style="danger" %}\
> This functionality is in preview mode - some of the features may not be fully operational yet.\
> {% endhint %}\
> \
> Starts deletion of one search index. The response is the id of the job that removes the index.

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["search.search_manage"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"search.search_read":"Needed to search documents, to read saved searches, and to read search indexes and index jobs.","search.search_manage":"Needed to create, update, and delete saved searches and search indexes.","schema.custominstance_read":"Needed to read every custom entity instance. When this scope is absent, `custom.{type}_read` or `custom.{type}_read_own` can still allow the search.","customer.customer_read":"Needed to search every customer. A restricted form such as `customer.customer_read--DE#AT` returns only customers whose `restriction` matches one of the listed values.","customer.customer_read_own":"Needed to search only the caller's own customer.","customermanagement.legalentity_read":"Needed to search every legal entity. A restricted form such as `customermanagement.legalentity_read--DE#AT` returns only legal entities whose `restrictions` contain one of the listed values.","customermanagement.legalentity_read_own":"Needed to search only the caller's own legal entity."}}}}},"schemas":{"JobId":{"type":"object","description":"Identifier of an index job.","properties":{"id":{"type":"string","description":"Job id."}}},"ErrorMessageFault":{"type":"object","description":"Authorization error returned by the API gateway.","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string","description":"Authorization failure."},"detail":{"type":"object","properties":{"errorcode":{"type":"string","description":"Gateway error code."}}}}}}},"ErrorMessage":{"type":"object","description":"Error returned for a failed request.","properties":{"code":{"type":"integer","description":"HTTP status code."},"status":{"type":"string","description":"HTTP status code as text."},"message":{"type":"string","description":"Explanation of the failure."},"details":{"type":"array","description":"Field-level or scope-level messages, when the failure has more than one part.","items":{"type":"object","properties":{"message":{"type":"string","description":"One part of the failure."}}}}}}},"responses":{"401_resp_common":{"description":"The authorization token is invalid or has expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageFault"}}}},"403_search_manage":{"description":"The access token does not include `search.search_manage`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500_resp_common":{"description":"A server-side error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}},"paths":{"/search/{tenant}/search/{type}/indexes/{id}":{"delete":{"summary":"Deleting a search index","operationId":"DELETE-search-tenant-type-indexes-id","tags":["Search Indexes"],"description":"![Preview](https://res.cloudinary.com/saas-ag/image/upload/v1752824268/emporix/icons/preview_api1.png)\n\n{% hint style=\"danger\" %}\nThis functionality is in preview mode - some of the features may not be fully operational yet.\n{% endhint %}\n\nStarts deletion of one search index. The response is the id of the job that removes the index.","responses":{"202":{"description":"Index deletion has started. The body is the job id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobId"}}}},"401":{"$ref":"#/components/responses/401_resp_common"},"403":{"$ref":"#/components/responses/403_search_manage"},"404":{"description":"No index with this id exists for the type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"409":{"description":"An index job is already in progress for this index.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"$ref":"#/components/responses/500_resp_common"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.emporix.io/api-references/readme/api-reference-33/search-indexes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
