Skip to content

Create text index by field for collection​

PUT
/mongodb/collections/{collectionName}/index/field/{fieldName}/text

Create text index by field for given collection

Authorizations​

httpAuth
Type
HTTP (bearer)
or
httpAuth1
Type
HTTP (basic)
or
apiKeyAuth
Type
API Key (header: X-AUTH-APIKEY)

Parameters​

Path Parameters

collectionName*

The name of your MongoDb Collection

Type
string
Required
fieldName*

The field Name for your index

Type
string
Required

Request Body​

application/json
JSON
{
  
"name": "string",
  
"background": true,
  
"defaultLanguage": "string",
  
"textVersion": 0,
  
"expireAfter": "string",
  
"unique": true,
  
"max": 0,
  
"min": 0,
  
"sparse": true,
  
"hidden": true,
  
"partialFilterExpression": {
  
  
"additionalProperties": null
  
},
  
"weights": {
  
  
"additionalProperties": 0
  
},
  
"collation": {
  
  
"additionalProperties": null
  
}
}

Responses​

application/json
JSON
{
  
"name": "string"
}

Playground​

Authorization
Variables
Key
Value
Body

Samples​

Powered by VitePress OpenAPI

Released under the MIT License.