Update One Atlas Search Index
Deprecated
Updates one Atlas Search index that you identified with its unique ID. Atlas Search indexes define the fields on which to create the index and the analyzers to use when creating the index. To use this resource, the requesting Service Account or API Key must have the Project Data Access Admin role.
Path parameters
-
Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
NOTE: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.
Format should match the following pattern:
^([a-f0-9]{24})$
. -
Name of the cluster that contains the collection whose Atlas Search index to update.
Format should match the following pattern:
^[a-zA-Z0-9][a-zA-Z0-9-]*$
. -
Unique 24-hexadecimal digit string that identifies the Atlas Search index. Use the Get All Atlas Search Indexes for a Collection API endpoint to find the IDs of all Atlas Search indexes.
Format should match the following pattern:
^([a-f0-9]{24})$
.
Query parameters
-
Flag that indicates whether Application wraps the response in an
envelope
JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body.Default value is
false
. -
Flag that indicates whether the response body should be in the prettyprint format.
Default value is
false
.Prettyprint
Body
object
Required
Details to update on the Atlas Search index.
-
Human-readable label that identifies the collection that contains one or more Atlas Search indexes.
-
Human-readable label that identifies the database that contains the collection with one or more Atlas Search indexes.
-
Human-readable label that identifies this index. Within each namespace, names of all indexes in the namespace must be unique.
-
Number of index partitions. Allowed values are [1, 2, 4].
Default value is
1
. -
Type of the index. Default type is search.
Value is
search
. -
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 a variety of changes made to the text in fields:
- extracting words
- removing punctuation
- removing accents
- changing to lowercase
- removing common words
- reducing words to their root form (stemming)
- changing words to their base form (lemmatization) MongoDB Cloud uses the selected process to build the Atlas Search index.
Values are
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
, orlucene.ukrainian
. Default value islucene.standard
.Atlas Search Analyzers -
List of user-defined methods to convert database field text into searchable words.
Settings that describe one Atlas Search custom analyzer.
Custom Atlas Search Analyzers -
Index specifications for the collection's fields.
-
Method applied to identify words when searching this index.
Values are
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
, orlucene.ukrainian
. Default value islucene.standard
. -
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. To learn more, see documentation.
Stored Source Fields -
Rule sets that map words to their synonyms in this index.
Synonyms used for this full text index.
Synonym Mapping
curl \
--request PATCH 'https://cloud.mongodb.com/api/atlas/v2/groups/32b6e34b3d91647abb20e7b8/clusters/{clusterName}/fts/indexes/{indexId}' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/vnd.atlas.2023-01-01+json"
{
"collectionName": "string",
"database": "string",
"name": "string",
"numPartitions": 1,
"type": "search",
"analyzer": "lucene.standard",
"analyzers": [
{
"name": "string",
"charFilters": [
{
"type": "htmlStrip",
"ignoredTags": [
"string"
]
}
],
"tokenizer": {
"type": "edgeGram",
"minGram": 42,
"maxGram": 42
},
"tokenFilters": [
{
"type": "asciiFolding",
"originalTokens": "omit"
}
]
}
],
"mappings": {
"dynamic": false,
"fields": {
"additionalProperty1": {},
"additionalProperty2": {}
}
},
"searchAnalyzer": "lucene.standard",
"storedSource": {
"include | exclude": [
"field1",
"field2"
]
},
"synonyms": [
{
"analyzer": "lucene.standard",
"name": "string",
"source": {
"collection": "string"
}
}
]
}
{
"collectionName": "string",
"database": "string",
"name": "string",
"numPartitions": 1,
"type": "vectorSearch",
"fields": [
{
"additionalProperty1": {},
"additionalProperty2": {}
}
]
}
{
"collectionName": "string",
"database": "string",
"name": "string",
"numPartitions": 1,
"type": "search",
"analyzer": "lucene.standard",
"analyzers": [
{
"name": "string",
"charFilters": [
{
"type": "htmlStrip",
"ignoredTags": [
"string"
]
}
],
"tokenizer": {
"type": "edgeGram",
"minGram": 42,
"maxGram": 42
},
"tokenFilters": [
{
"type": "asciiFolding",
"originalTokens": "omit"
}
]
}
],
"mappings": {
"dynamic": false,
"fields": {
"additionalProperty1": {},
"additionalProperty2": {}
}
},
"searchAnalyzer": "lucene.standard",
"storedSource": {
"include | exclude": [
"field1",
"field2"
]
},
"synonyms": [
{
"analyzer": "lucene.standard",
"name": "string",
"source": {
"collection": "string"
}
}
]
}
{
"collectionName": "string",
"database": "string",
"name": "string",
"numPartitions": 1,
"type": "vectorSearch",
"fields": [
{
"additionalProperty1": {},
"additionalProperty2": {}
}
]
}
{
"error": 400,
"detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
"reason": "Bad Request",
"errorCode": "VALIDATION_ERROR"
}
{
"error": 401,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Unauthorized",
"errorCode": "NOT_ORG_GROUP_CREATOR"
}
{
"error": 403,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Forbidden",
"errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
{
"error": 404,
"detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
"reason": "Not Found",
"errorCode": "RESOURCE_NOT_FOUND"
}
{
"error": 409,
"detail": "(This is just an example, the exception may not be related to this endpoint) Cannot delete organization link while there is active migration in following project ids: 60c4fd418ebe251047c50554",
"reason": "Conflict",
"errorCode": "CANNOT_DELETE_ORG_ACTIVE_LIVE_MIGRATION_ATLAS_ORG_LINK"
}
{
"error": 500,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Internal Server Error",
"errorCode": "UNEXPECTED_ERROR"
}