> 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/models.md). Agents can also search and read this documentation through its [MCP server](https://developer.emporix.io/~gitbook/mcp).

# Models

## The IndexRequest object

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"components":{"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"]}}}}
```

## The IndexField object

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"components":{"schemas":{"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"]}}}}
```

## The IndexAnalyzer object

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"components":{"schemas":{"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"]}}}}
```

## The IndexMetadataRequest object

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"components":{"schemas":{"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"]}}}}
```

## The IndexSelection object

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"components":{"schemas":{"IndexSelection":{"type":"object","description":"One index to export. Unknown properties are ignored.","properties":{"type":{"type":"string","description":"Type this index belongs to. A custom schema type, `customer`, or `legal-entity`."},"id":{"type":"string","description":"Index id. Use 1 to 66 characters. Allowed characters are letters, digits, underscore, and hyphen."}},"required":["type","id"]}}}}
```

## The IndexExportPackage object

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"components":{"schemas":{"IndexExportPackage":{"type":"object","description":"Package of search index configuration. `data` is the base64 encoding of a JSON array.\n\nEach decoded item has `id`, `type`, and `fields`. `name`, `description`, and `analyzers` are optional. Export omits `status` and `metadata`. Import accepts `metadata.version` when the caller sends it.","properties":{"exportedAt":{"type":"string","format":"date-time","description":"Date and time when the package was exported."},"data":{"type":"string","description":"Base64-encoded JSON array of index configurations."}},"required":["exportedAt","data"]}}}}
```

## The IndexImportResult object

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"components":{"schemas":{"IndexImportResult":{"type":"object","description":"Result of importing one index. `jobId` and `jobType` are omitted when the ready index is unchanged.","properties":{"id":{"type":"string","description":"Index id."},"type":{"type":"string","description":"Type this index belongs to. A custom schema type, `customer`, or `legal-entity`."},"jobId":{"type":"string","description":"Identifier of the job that builds the index. Present when a job starts."},"jobType":{"type":"string","description":"Kind of index change. Present when a job starts.\n* `create_index` – the index was created.\n* `update_index` – an existing index's field definition changed.","enum":["create_index","update_index"]}},"required":["id","type"]}}}}
```

## The SearchIndex object

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"components":{"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."}}}}}}
```

## The JobId object

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"components":{"schemas":{"JobId":{"type":"object","description":"Identifier of an index job.","properties":{"id":{"type":"string","description":"Job id."}}}}}}
```

## The IndexJob object

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"components":{"schemas":{"IndexJob":{"type":"object","description":"One index build or deletion job.","properties":{"id":{"type":"string","description":"Job id."},"status":{"type":"string","description":"Current state of the job.","enum":["in_progress","success","failure"]},"type":{"type":"string","description":"Kind of index change.","enum":["create_index","update_index","delete_index"]},"indexId":{"type":"string","description":"Index id."},"message":{"type":"string","description":"Text recorded when the job started."},"response":{"type":"string","description":"Result text recorded when the job finishes."},"metadata":{"$ref":"#/components/schemas/ResourceMetadata"}}},"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."}}}}}}
```

## The ResourceMetadata object

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"components":{"schemas":{"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."}}}}}}
```

## The SearchRequest object

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"components":{"schemas":{"SearchRequest":{"type":"object","description":"Search criteria. Provide `queries`, `filters`, or both. `index` is always required. Unknown properties are ignored. Use `SavedSearchCall` instead when the body contains `searchQueryId`.\n\nA list of queries matches when any query matches. An `and` group matches when every query matches. An `or` group matches when any query matches. Filters narrow those matches and do not change the score.","properties":{"queries":{"description":"Queries to match. Use an array as shorthand for an `or` group, or an `and` group, an `or` group, or one query.\n\n`name` is localized. The search uses the field path as sent. It does not expand `name` with the `Accept-Language` value.","oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/QueryNode"}},{"$ref":"#/components/schemas/QueryNode"}]},"filters":{"$ref":"#/components/schemas/FilterNode"},"index":{"type":"string","description":"Name of the index to query."}},"required":["index"],"anyOf":[{"required":["queries"]},{"required":["filters"]}]},"QueryNode":{"type":"object","description":"One query node. A node is an `and` group, an `or` group, or one query. Do not combine those forms in the same object.","properties":{"and":{"type":"array","description":"Every child must match.","items":{"$ref":"#/components/schemas/QueryNode"}},"or":{"type":"array","description":"Any child must match.","items":{"$ref":"#/components/schemas/QueryNode"}},"type":{"$ref":"#/components/schemas/SearchType"},"query":{"type":"string","description":"Text or pattern to match."},"field":{"type":"string","description":"Document field to match. `id` is stored as `_id`. A field inside `itemFields` uses its full path, such as `addresses.city`. Conditions on one list joined by `and` must match the same item. The list path itself cannot be searched."},"boost":{"type":"number","minimum":0,"exclusiveMinimum":true,"default":1,"description":"Score multiplier for matches on this field. The default is 1."},"fuzzy":{"$ref":"#/components/schemas/Fuzzy"},"analyzer":{"type":"string","description":"Optional analyzer for this clause. Allowed only when `type` is `TEXT` or `PHRASE`.\n\nThe value is the field's `analyzer`, or one name from that field's `additionalAnalyzers`. The name is not case-sensitive. When omitted, the query uses the field's `analyzer`."}}},"SearchType":{"type":"string","description":"Match mode.\n\n* `TEXT` matches the query tokens.\n* `PHRASE` matches the query as adjacent words in order.\n* `AUTOCOMPLETE` matches the index field's autocomplete mode. `PREFIX` matches the start of a word. `NGRAM` matches a character sequence inside a word.\n* `WILDCARD` matches a pattern. `*` matches any number of characters. `?` matches one character. Fuzzy matching is not supported.","enum":["TEXT","PHRASE","AUTOCOMPLETE","WILDCARD"]},"Fuzzy":{"type":"object","description":"Edit-distance matching. Supported only when `type` is `TEXT` and `enabled` is `true`.","properties":{"enabled":{"type":"boolean","description":"When `true`, matches that are one or two edits from the query are included."},"maxEdits":{"type":"integer","description":"Maximum edit distance. Required when `enabled` is `true`. Allowed values are 1 and 2.","enum":[1,2]}}},"FilterNode":{"type":"object","description":"One filter node. A node is an `and` group, an `or` group, or a comparison. Do not combine those forms in the same object.\n\nComparison fields must be indexed on the index named by `index`.","properties":{"and":{"type":"array","minItems":1,"description":"Every child must match. The group must not be empty.","items":{"$ref":"#/components/schemas/FilterNode"}},"or":{"type":"array","minItems":1,"description":"At least one child must match. The group must not be empty.","items":{"$ref":"#/components/schemas/FilterNode"}},"field":{"type":"string","description":"Document field to compare. `id` is stored as `_id`. A field inside `itemFields` uses its full path, such as `addresses.city`. Conditions on one list joined by `and` must match the same item. A lone `NEQ`, `NOT_IN`, or `EXISTS` `false` on a list excludes the document when any item matches the value. A document with no items in that list matches. The same operator joined by `and` with another condition on that list still applies to one item. The list path itself cannot be searched."},"operator":{"$ref":"#/components/schemas/FilterOperator"},"value":{"description":"Comparison value. The shape depends on `operator`.\n\n* `EQ`, `NEQ`, `GT`, `GTE`, `LT`, and `LTE` require one value.\n* `BETWEEN` requires an array of two values. The range is inclusive.\n* `IN` and `NOT_IN` require a non-empty array.\n* `EXISTS` requires a boolean. `true` matches documents where the field is present. `false` matches documents where the field is absent.\n* `CONTAINS` requires a non-blank string. The field must have `text: true` in the index."}}},"FilterOperator":{"type":"string","description":"Comparison applied to `field` and `value`.\n\n`CONTAINS` performs a case- and diacritic-insensitive substring match. The service wraps the value in `*` and escapes `\\`, `*`, and `?` within it. Spaces remain part of the value.","enum":["EQ","NEQ","GT","GTE","LT","LTE","BETWEEN","IN","NOT_IN","EXISTS","CONTAINS"]}}}}
```

## The SavedSearchCall object

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"components":{"schemas":{"SavedSearchCall":{"type":"object","description":"Runs one saved search. Use this shape when `searchQueryId` is present. The saved search supplies the index, the filters, and the query shape. `query` replaces the text of every search term. A saved search that contains only filters keeps those filters.","properties":{"query":{"type":"string","minLength":1,"description":"Text applied to every search term in the saved search. The value must not be blank."},"searchQueryId":{"type":"string","description":"Id of the saved search for this type."}},"required":["query","searchQueryId"]}}}}
```

## The SavedQueryRequest object

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"components":{"schemas":{"SavedQueryRequest":{"type":"object","description":"Definition of a saved search. Unknown properties are ignored. The body must include `queries`, `filters`, or both. `index` must already exist for the type.","properties":{"id":{"type":"string","description":"Saved search id. Optional. When it is present, it must equal the `{id}` path parameter."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized name of the saved search."},"description":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized description of the saved search."},"index":{"type":"string","description":"Id of the search index this saved search uses."},"queries":{"description":"Queries stored with the saved search. A list is stored as one `or` group. A single query object is stored unchanged.","oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/QueryNode"}},{"$ref":"#/components/schemas/QueryNode"}]},"filters":{"$ref":"#/components/schemas/FilterNode"},"metadata":{"$ref":"#/components/schemas/QueryMetadataRequest"}},"required":["index"],"anyOf":[{"required":["queries"]},{"required":["filters"]}]},"QueryNode":{"type":"object","description":"One query node. A node is an `and` group, an `or` group, or one query. Do not combine those forms in the same object.","properties":{"and":{"type":"array","description":"Every child must match.","items":{"$ref":"#/components/schemas/QueryNode"}},"or":{"type":"array","description":"Any child must match.","items":{"$ref":"#/components/schemas/QueryNode"}},"type":{"$ref":"#/components/schemas/SearchType"},"query":{"type":"string","description":"Text or pattern to match."},"field":{"type":"string","description":"Document field to match. `id` is stored as `_id`. A field inside `itemFields` uses its full path, such as `addresses.city`. Conditions on one list joined by `and` must match the same item. The list path itself cannot be searched."},"boost":{"type":"number","minimum":0,"exclusiveMinimum":true,"default":1,"description":"Score multiplier for matches on this field. The default is 1."},"fuzzy":{"$ref":"#/components/schemas/Fuzzy"},"analyzer":{"type":"string","description":"Optional analyzer for this clause. Allowed only when `type` is `TEXT` or `PHRASE`.\n\nThe value is the field's `analyzer`, or one name from that field's `additionalAnalyzers`. The name is not case-sensitive. When omitted, the query uses the field's `analyzer`."}}},"SearchType":{"type":"string","description":"Match mode.\n\n* `TEXT` matches the query tokens.\n* `PHRASE` matches the query as adjacent words in order.\n* `AUTOCOMPLETE` matches the index field's autocomplete mode. `PREFIX` matches the start of a word. `NGRAM` matches a character sequence inside a word.\n* `WILDCARD` matches a pattern. `*` matches any number of characters. `?` matches one character. Fuzzy matching is not supported.","enum":["TEXT","PHRASE","AUTOCOMPLETE","WILDCARD"]},"Fuzzy":{"type":"object","description":"Edit-distance matching. Supported only when `type` is `TEXT` and `enabled` is `true`.","properties":{"enabled":{"type":"boolean","description":"When `true`, matches that are one or two edits from the query are included."},"maxEdits":{"type":"integer","description":"Maximum edit distance. Required when `enabled` is `true`. Allowed values are 1 and 2.","enum":[1,2]}}},"FilterNode":{"type":"object","description":"One filter node. A node is an `and` group, an `or` group, or a comparison. Do not combine those forms in the same object.\n\nComparison fields must be indexed on the index named by `index`.","properties":{"and":{"type":"array","minItems":1,"description":"Every child must match. The group must not be empty.","items":{"$ref":"#/components/schemas/FilterNode"}},"or":{"type":"array","minItems":1,"description":"At least one child must match. The group must not be empty.","items":{"$ref":"#/components/schemas/FilterNode"}},"field":{"type":"string","description":"Document field to compare. `id` is stored as `_id`. A field inside `itemFields` uses its full path, such as `addresses.city`. Conditions on one list joined by `and` must match the same item. A lone `NEQ`, `NOT_IN`, or `EXISTS` `false` on a list excludes the document when any item matches the value. A document with no items in that list matches. The same operator joined by `and` with another condition on that list still applies to one item. The list path itself cannot be searched."},"operator":{"$ref":"#/components/schemas/FilterOperator"},"value":{"description":"Comparison value. The shape depends on `operator`.\n\n* `EQ`, `NEQ`, `GT`, `GTE`, `LT`, and `LTE` require one value.\n* `BETWEEN` requires an array of two values. The range is inclusive.\n* `IN` and `NOT_IN` require a non-empty array.\n* `EXISTS` requires a boolean. `true` matches documents where the field is present. `false` matches documents where the field is absent.\n* `CONTAINS` requires a non-blank string. The field must have `text: true` in the index."}}},"FilterOperator":{"type":"string","description":"Comparison applied to `field` and `value`.\n\n`CONTAINS` performs a case- and diacritic-insensitive substring match. The service wraps the value in `*` and escapes `\\`, `*`, and `?` within it. Spaces remain part of the value.","enum":["EQ","NEQ","GT","GTE","LT","LTE","BETWEEN","IN","NOT_IN","EXISTS","CONTAINS"]},"QueryMetadataRequest":{"type":"object","description":"Optimistic lock for a saved search update. Required when the saved search already exists.","properties":{"version":{"type":"integer","minimum":1,"description":"Current stored version. Required on update. A missing version on update returns 400. A version that does not match the stored saved search returns 409."}},"required":["version"]}}}}
```

## The QueryMetadataRequest object

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"components":{"schemas":{"QueryMetadataRequest":{"type":"object","description":"Optimistic lock for a saved search update. Required when the saved search already exists.","properties":{"version":{"type":"integer","minimum":1,"description":"Current stored version. Required on update. A missing version on update returns 400. A version that does not match the stored saved search returns 409."}},"required":["version"]}}}}
```

## The SavedQueryId object

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"components":{"schemas":{"SavedQueryId":{"type":"object","description":"Identifier of a created saved search.","properties":{"id":{"type":"string","description":"Saved search id."}},"required":["id"]}}}}
```

## The SavedQuery object

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"components":{"schemas":{"SavedQuery":{"type":"object","description":"One stored saved search. The request field `index` is returned as `indexId`. `queries` is one query node. A list sent on save is returned as one `or` group.","properties":{"id":{"type":"string","description":"Saved search id."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized name of the saved search."},"description":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized description of the saved search."},"type":{"type":"string","description":"Type this saved search belongs to. A custom schema type, `customer`, or `legal-entity`."},"indexId":{"type":"string","description":"Id of the search index this saved search uses."},"queries":{"$ref":"#/components/schemas/QueryNode"},"filters":{"$ref":"#/components/schemas/FilterNode"},"metadata":{"$ref":"#/components/schemas/ResourceMetadata"}}},"QueryNode":{"type":"object","description":"One query node. A node is an `and` group, an `or` group, or one query. Do not combine those forms in the same object.","properties":{"and":{"type":"array","description":"Every child must match.","items":{"$ref":"#/components/schemas/QueryNode"}},"or":{"type":"array","description":"Any child must match.","items":{"$ref":"#/components/schemas/QueryNode"}},"type":{"$ref":"#/components/schemas/SearchType"},"query":{"type":"string","description":"Text or pattern to match."},"field":{"type":"string","description":"Document field to match. `id` is stored as `_id`. A field inside `itemFields` uses its full path, such as `addresses.city`. Conditions on one list joined by `and` must match the same item. The list path itself cannot be searched."},"boost":{"type":"number","minimum":0,"exclusiveMinimum":true,"default":1,"description":"Score multiplier for matches on this field. The default is 1."},"fuzzy":{"$ref":"#/components/schemas/Fuzzy"},"analyzer":{"type":"string","description":"Optional analyzer for this clause. Allowed only when `type` is `TEXT` or `PHRASE`.\n\nThe value is the field's `analyzer`, or one name from that field's `additionalAnalyzers`. The name is not case-sensitive. When omitted, the query uses the field's `analyzer`."}}},"SearchType":{"type":"string","description":"Match mode.\n\n* `TEXT` matches the query tokens.\n* `PHRASE` matches the query as adjacent words in order.\n* `AUTOCOMPLETE` matches the index field's autocomplete mode. `PREFIX` matches the start of a word. `NGRAM` matches a character sequence inside a word.\n* `WILDCARD` matches a pattern. `*` matches any number of characters. `?` matches one character. Fuzzy matching is not supported.","enum":["TEXT","PHRASE","AUTOCOMPLETE","WILDCARD"]},"Fuzzy":{"type":"object","description":"Edit-distance matching. Supported only when `type` is `TEXT` and `enabled` is `true`.","properties":{"enabled":{"type":"boolean","description":"When `true`, matches that are one or two edits from the query are included."},"maxEdits":{"type":"integer","description":"Maximum edit distance. Required when `enabled` is `true`. Allowed values are 1 and 2.","enum":[1,2]}}},"FilterNode":{"type":"object","description":"One filter node. A node is an `and` group, an `or` group, or a comparison. Do not combine those forms in the same object.\n\nComparison fields must be indexed on the index named by `index`.","properties":{"and":{"type":"array","minItems":1,"description":"Every child must match. The group must not be empty.","items":{"$ref":"#/components/schemas/FilterNode"}},"or":{"type":"array","minItems":1,"description":"At least one child must match. The group must not be empty.","items":{"$ref":"#/components/schemas/FilterNode"}},"field":{"type":"string","description":"Document field to compare. `id` is stored as `_id`. A field inside `itemFields` uses its full path, such as `addresses.city`. Conditions on one list joined by `and` must match the same item. A lone `NEQ`, `NOT_IN`, or `EXISTS` `false` on a list excludes the document when any item matches the value. A document with no items in that list matches. The same operator joined by `and` with another condition on that list still applies to one item. The list path itself cannot be searched."},"operator":{"$ref":"#/components/schemas/FilterOperator"},"value":{"description":"Comparison value. The shape depends on `operator`.\n\n* `EQ`, `NEQ`, `GT`, `GTE`, `LT`, and `LTE` require one value.\n* `BETWEEN` requires an array of two values. The range is inclusive.\n* `IN` and `NOT_IN` require a non-empty array.\n* `EXISTS` requires a boolean. `true` matches documents where the field is present. `false` matches documents where the field is absent.\n* `CONTAINS` requires a non-blank string. The field must have `text: true` in the index."}}},"FilterOperator":{"type":"string","description":"Comparison applied to `field` and `value`.\n\n`CONTAINS` performs a case- and diacritic-insensitive substring match. The service wraps the value in `*` and escapes `\\`, `*`, and `?` within it. Spaces remain part of the value.","enum":["EQ","NEQ","GT","GTE","LT","LTE","BETWEEN","IN","NOT_IN","EXISTS","CONTAINS"]},"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."}}}}}}
```

## The QueryNode object

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"components":{"schemas":{"QueryNode":{"type":"object","description":"One query node. A node is an `and` group, an `or` group, or one query. Do not combine those forms in the same object.","properties":{"and":{"type":"array","description":"Every child must match.","items":{"$ref":"#/components/schemas/QueryNode"}},"or":{"type":"array","description":"Any child must match.","items":{"$ref":"#/components/schemas/QueryNode"}},"type":{"$ref":"#/components/schemas/SearchType"},"query":{"type":"string","description":"Text or pattern to match."},"field":{"type":"string","description":"Document field to match. `id` is stored as `_id`. A field inside `itemFields` uses its full path, such as `addresses.city`. Conditions on one list joined by `and` must match the same item. The list path itself cannot be searched."},"boost":{"type":"number","minimum":0,"exclusiveMinimum":true,"default":1,"description":"Score multiplier for matches on this field. The default is 1."},"fuzzy":{"$ref":"#/components/schemas/Fuzzy"},"analyzer":{"type":"string","description":"Optional analyzer for this clause. Allowed only when `type` is `TEXT` or `PHRASE`.\n\nThe value is the field's `analyzer`, or one name from that field's `additionalAnalyzers`. The name is not case-sensitive. When omitted, the query uses the field's `analyzer`."}}},"SearchType":{"type":"string","description":"Match mode.\n\n* `TEXT` matches the query tokens.\n* `PHRASE` matches the query as adjacent words in order.\n* `AUTOCOMPLETE` matches the index field's autocomplete mode. `PREFIX` matches the start of a word. `NGRAM` matches a character sequence inside a word.\n* `WILDCARD` matches a pattern. `*` matches any number of characters. `?` matches one character. Fuzzy matching is not supported.","enum":["TEXT","PHRASE","AUTOCOMPLETE","WILDCARD"]},"Fuzzy":{"type":"object","description":"Edit-distance matching. Supported only when `type` is `TEXT` and `enabled` is `true`.","properties":{"enabled":{"type":"boolean","description":"When `true`, matches that are one or two edits from the query are included."},"maxEdits":{"type":"integer","description":"Maximum edit distance. Required when `enabled` is `true`. Allowed values are 1 and 2.","enum":[1,2]}}}}}}
```

## The SearchType object

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"components":{"schemas":{"SearchType":{"type":"string","description":"Match mode.\n\n* `TEXT` matches the query tokens.\n* `PHRASE` matches the query as adjacent words in order.\n* `AUTOCOMPLETE` matches the index field's autocomplete mode. `PREFIX` matches the start of a word. `NGRAM` matches a character sequence inside a word.\n* `WILDCARD` matches a pattern. `*` matches any number of characters. `?` matches one character. Fuzzy matching is not supported.","enum":["TEXT","PHRASE","AUTOCOMPLETE","WILDCARD"]}}}}
```

## The Fuzzy object

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"components":{"schemas":{"Fuzzy":{"type":"object","description":"Edit-distance matching. Supported only when `type` is `TEXT` and `enabled` is `true`.","properties":{"enabled":{"type":"boolean","description":"When `true`, matches that are one or two edits from the query are included."},"maxEdits":{"type":"integer","description":"Maximum edit distance. Required when `enabled` is `true`. Allowed values are 1 and 2.","enum":[1,2]}}}}}}
```

## The FilterNode object

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"components":{"schemas":{"FilterNode":{"type":"object","description":"One filter node. A node is an `and` group, an `or` group, or a comparison. Do not combine those forms in the same object.\n\nComparison fields must be indexed on the index named by `index`.","properties":{"and":{"type":"array","minItems":1,"description":"Every child must match. The group must not be empty.","items":{"$ref":"#/components/schemas/FilterNode"}},"or":{"type":"array","minItems":1,"description":"At least one child must match. The group must not be empty.","items":{"$ref":"#/components/schemas/FilterNode"}},"field":{"type":"string","description":"Document field to compare. `id` is stored as `_id`. A field inside `itemFields` uses its full path, such as `addresses.city`. Conditions on one list joined by `and` must match the same item. A lone `NEQ`, `NOT_IN`, or `EXISTS` `false` on a list excludes the document when any item matches the value. A document with no items in that list matches. The same operator joined by `and` with another condition on that list still applies to one item. The list path itself cannot be searched."},"operator":{"$ref":"#/components/schemas/FilterOperator"},"value":{"description":"Comparison value. The shape depends on `operator`.\n\n* `EQ`, `NEQ`, `GT`, `GTE`, `LT`, and `LTE` require one value.\n* `BETWEEN` requires an array of two values. The range is inclusive.\n* `IN` and `NOT_IN` require a non-empty array.\n* `EXISTS` requires a boolean. `true` matches documents where the field is present. `false` matches documents where the field is absent.\n* `CONTAINS` requires a non-blank string. The field must have `text: true` in the index."}}},"FilterOperator":{"type":"string","description":"Comparison applied to `field` and `value`.\n\n`CONTAINS` performs a case- and diacritic-insensitive substring match. The service wraps the value in `*` and escapes `\\`, `*`, and `?` within it. Spaces remain part of the value.","enum":["EQ","NEQ","GT","GTE","LT","LTE","BETWEEN","IN","NOT_IN","EXISTS","CONTAINS"]}}}}
```

## The FilterOperator object

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"components":{"schemas":{"FilterOperator":{"type":"string","description":"Comparison applied to `field` and `value`.\n\n`CONTAINS` performs a case- and diacritic-insensitive substring match. The service wraps the value in `*` and escapes `\\`, `*`, and `?` within it. Spaces remain part of the value.","enum":["EQ","NEQ","GT","GTE","LT","LTE","BETWEEN","IN","NOT_IN","EXISTS","CONTAINS"]}}}}
```

## The SearchHit object

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"components":{"schemas":{"SearchHit":{"type":"object","description":"A matching document. Stored fields are returned with their API names. The identifier is `id`.\n\nThe `name` is localized. Other stored fields are returned as they are stored. When `fields` limits the response, the response includes the requested fields and `id`.","properties":{"id":{"type":"string","description":"Document identifier."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized name. A specific `Accept-Language` value keeps one language. `*` keeps every stored language."},"_score":{"type":"number","description":"Search relevance score. Included when `fields` is omitted, or when `fields` lists `_score`."}},"additionalProperties":true}}}}
```

## The ErrorMessage object

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"components":{"schemas":{"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."}}}}}}}}}
```

## The ErrorMessageFault object

```json
{"openapi":"3.0.0","info":{"title":"Search Service","version":"0.0.1"},"components":{"schemas":{"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."}}}}}}}}}}
```


---

# 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/models.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.
