{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/mongodb/main/json-schema/mongodb-search-index-update-request-schema.json", "title": "Search Index Update Request", "x-generated": "2026-10-03", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/mongodb-atlas-search-api-openapi.yml#/components/schemas/SearchIndexUpdateRequest", "properties": { "definition": { "description": "The index definition to update the search index to.", "oneOf": [ { "$ref": "#/$defs/TextSearchIndexDefinition" }, { "$ref": "#/$defs/VectorSearchIndexDefinition" } ], "type": "object" } }, "required": [ "definition" ], "type": "object", "$defs": { "AtlasSearchAnalyzer": { "properties": { "charFilters": { "description": "Filters that examine text one character at a time and perform filtering operations.", "items": { "$ref": "#/$defs/BasicDBObject" }, "type": "array" }, "name": { "description": "Name that identifies the custom analyzer. Names must be unique within an index, and must not start with any of the following strings:\n- `lucene.`\n- `builtin.`\n- `mongodb.`", "type": "string" }, "tokenFilters": { "description": "Filter that performs operations such as:\n\n- Stemming, which reduces related words, such as \"talking\", \"talked\", and \"talks\" to their root word \"talk\".\n\n- Redaction, which is the removal of sensitive information from public documents.", "items": { "$ref": "#/$defs/BasicDBObject" }, "type": "array" }, "tokenizer": { "additionalProperties": { "description": "Tokenizer that you want to use to create tokens. Tokens determine how Atlas Search splits up text into discrete chunks for indexing.", "type": "object" }, "description": "Tokenizer that you want to use to create tokens. Tokens determine how Atlas Search splits up text into discrete chunks for indexing.", "type": "object" } }, "required": [ "name", "tokenizer" ], "title": "Atlas Search Analyzer", "type": "object" }, "BasicDBObject": { "additionalProperties": { "type": "object" }, "type": "object" }, "Fields": { "type": "object" }, "SearchMappings": { "description": "Index specifications for the collection's fields.", "properties": { "dynamic": { "description": "Indicates whether the index uses static, default dynamic, or configurable dynamic mappings. Set to `true` to enable dynamic mapping with default type set or define object to specify the name of the configured type sets for dynamic mapping. If you specify configurable dynamic mappings, you must define the referred type sets in the `typeSets` field. Set to `false` to use only static mappings through `mappings.fields`.", "type": "object" }, "fields": { "additionalProperties": { "$ref": "#/$defs/Fields" }, "description": "One or more field specifications for the Atlas Search index. Required if `mappings.dynamic` is omitted or set to `false`.", "type": "object", "x-additionalPropertiesName": "Field Name" } }, "title": "Mappings", "type": "object" }, "SearchSynonymMappingDefinition": { "description": "Synonyms used for this full text index.", "properties": { "analyzer": { "description": "Specific pre-defined method chosen to apply to the synonyms to be searched.", "enum": [ "lucene.standard", "lucene.simple", "lucene.whitespace", "lucene.keyword", "lucene.arabic", "lucene.armenian", "lucene.basque", "lucene.bengali", "lucene.brazilian", "lucene.bulgarian", "lucene.catalan", "lucene.chinese", "lucene.cjk", "lucene.czech", "lucene.danish", "lucene.dutch", "lucene.english", "lucene.finnish", "lucene.french", "lucene.galician", "lucene.german", "lucene.greek", "lucene.hindi", "lucene.hungarian", "lucene.indonesian", "lucene.irish", "lucene.italian", "lucene.japanese", "lucene.korean", "lucene.kuromoji", "lucene.latvian", "lucene.lithuanian", "lucene.morfologik", "lucene.nori", "lucene.norwegian", "lucene.persian", "lucene.portuguese", "lucene.romanian", "lucene.russian", "lucene.smartcn", "lucene.sorani", "lucene.spanish", "lucene.swedish", "lucene.thai", "lucene.turkish", "lucene.ukrainian" ], "type": "string" }, "name": { "description": "Label that identifies the synonym definition. Each `synonym.name` must be unique within the same index definition.", "type": "string" }, "source": { "$ref": "#/$defs/SynonymSource" } }, "required": [ "analyzer", "name", "source" ], "title": "Synonym Mapping Definition", "type": "object" }, "SearchTypeSets": { "description": "Type sets for an Atlas Search index definition.", "properties": { "name": { "description": "Label that identifies the type set name. Each `typeSets.name` must be unique within the same index definition.", "type": "string" }, "types": { "description": "List of types associated with the type set. Each type definition must include a `type` field specifying the search field type (`autocomplete`, `boolean`, `date`, `geo`, `number`, `objectId`, `string`, `token`, or `uuid`) and may include additional configuration properties specific to that type.", "items": { "$ref": "#/$defs/BasicDBObject" }, "maxItems": 100, "type": "array" } }, "required": [ "name", "types" ], "title": "TypeSets", "type": "object" }, "SynonymSource": { "description": "Data set that stores words and their applicable synonyms.", "properties": { "collection": { "description": "Label that identifies the MongoDB collection that stores words and their applicable synonyms.", "type": "string" } }, "required": [ "collection" ], "type": "object" }, "TextSearchIndexDefinition": { "description": "The text search index definition set by the user.", "properties": { "analyzer": { "default": "lucene.standard", "description": "Specific pre-defined method chosen to convert database field text into searchable words. This conversion reduces the text of fields into the smallest units of text. These units are called a **term** or **token**. This process, known as tokenization, involves making the following changes to the text in fields:\n\n- extracting words\n- removing punctuation\n- removing accents\n- changing to lowercase\n- removing common words\n- reducing words to their root form (stemming)\n- changing words to their base form (lemmatization)\n MongoDB Cloud uses the process you select to build the Atlas Search index.", "enum": [ "lucene.standard", "lucene.simple", "lucene.whitespace", "lucene.keyword", "lucene.arabic", "lucene.armenian", "lucene.basque", "lucene.bengali", "lucene.brazilian", "lucene.bulgarian", "lucene.catalan", "lucene.chinese", "lucene.cjk", "lucene.czech", "lucene.danish", "lucene.dutch", "lucene.english", "lucene.finnish", "lucene.french", "lucene.galician", "lucene.german", "lucene.greek", "lucene.hindi", "lucene.hungarian", "lucene.indonesian", "lucene.irish", "lucene.italian", "lucene.japanese", "lucene.korean", "lucene.kuromoji", "lucene.latvian", "lucene.lithuanian", "lucene.morfologik", "lucene.nori", "lucene.norwegian", "lucene.persian", "lucene.portuguese", "lucene.romanian", "lucene.russian", "lucene.smartcn", "lucene.sorani", "lucene.spanish", "lucene.swedish", "lucene.thai", "lucene.turkish", "lucene.ukrainian" ], "type": "string" }, "analyzers": { "description": "List of user-defined methods to convert database field text into searchable words.", "items": { "$ref": "#/$defs/AtlasSearchAnalyzer" }, "type": "array" }, "mappings": { "$ref": "#/$defs/SearchMappings" }, "numPartitions": { "default": 1, "description": "Number of index partitions. Allowed values are [1, 2, 4].", "format": "int32", "type": "integer" }, "searchAnalyzer": { "default": "lucene.standard", "description": "Method applied to identify words when searching this index.", "enum": [ "lucene.standard", "lucene.simple", "lucene.whitespace", "lucene.keyword", "lucene.arabic", "lucene.armenian", "lucene.basque", "lucene.bengali", "lucene.brazilian", "lucene.bulgarian", "lucene.catalan", "lucene.chinese", "lucene.cjk", "lucene.czech", "lucene.danish", "lucene.dutch", "lucene.english", "lucene.finnish", "lucene.french", "lucene.galician", "lucene.german", "lucene.greek", "lucene.hindi", "lucene.hungarian", "lucene.indonesian", "lucene.irish", "lucene.italian", "lucene.japanese", "lucene.korean", "lucene.kuromoji", "lucene.latvian", "lucene.lithuanian", "lucene.morfologik", "lucene.nori", "lucene.norwegian", "lucene.persian", "lucene.portuguese", "lucene.romanian", "lucene.russian", "lucene.smartcn", "lucene.sorani", "lucene.spanish", "lucene.swedish", "lucene.thai", "lucene.turkish", "lucene.ukrainian" ], "type": "string" }, "sort": { "description": "Sort definition for the index. When defined, the index will be pre-sorted on the specified fields, which improves query sort performance for those fields. Supports two formats: simple format with field name and direction, or complex format with additional options. The `order` field is required (1=ascending, -1=descending).The `noData` field is optional and controls how missing values are sorted(default: \"lowest\").", "type": "object" }, "storedSource": { "description": "Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. Note that storing all fields (true) is not allowed for vector search indexes. To learn more, see Stored Source Fields.", "type": "object" }, "synonyms": { "description": "Rule sets that map words to their synonyms in this index.", "items": { "$ref": "#/$defs/SearchSynonymMappingDefinition" }, "type": "array" }, "typeSets": { "description": "Type sets for the index.", "items": { "$ref": "#/$defs/SearchTypeSets" }, "maxItems": 100, "type": "array" } }, "required": [ "mappings" ], "title": "Text Search Index Definition", "type": "object" }, "VectorSearchIndexDefinition": { "description": "The vector search index definition set by the user.", "properties": { "fields": { "description": "Settings that configure the fields, one per object, to index. You must define at least one \"vector\" type field. You can optionally define \"filter\" type fields also.", "items": { "$ref": "#/$defs/BasicDBObject" }, "type": "array" }, "nestedRoot": { "description": "Top-level path to the array that contains vector fields. When provided, vector fields under this path are treated as nested.", "type": "string" }, "numPartitions": { "default": 1, "description": "Number of index partitions. Allowed values are [1, 2, 4].", "format": "int32", "type": "integer" }, "storedSource": { "description": "Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. Note that storing all fields (true) is not allowed for vector search indexes. To learn more, see Stored Source Fields.", "type": "object" } }, "required": [ "fields" ], "title": "Vector Search Index Definition", "type": "object" } } }