Indexes

Create fulltext index

Create full-text index, if it does not already exist.

post/_fabric/{fabric}/_api/index/fulltext

Request

Path parameters

fabricstring string required

The name of the fabric.

Query parameters

collectionstring required

The collection name.

Request body

fieldsstring[] required

An array of attribute names. Currently, the array is limited to exactly one attribute.

minLengthinteger

Minimum character length of words to index. Will default to a server-defined value if unspecified. It is thus recommended to set this value explicitly when creating the index.

typestring required

Must be equal to "fulltext".

Example request

{
  "fields": [
    "_key"
  ],
  "type": "fulltext"
}

Response

Successfully fetched existing index.

codeinteger

HTTP response code.

errorboolean

Flag if there is an error in response. False for this response.

fieldsstring[]

Array of fields on which index is created.

idstring

Index identifier.

namestring

Name of the index.

selectivityEstimatenumber

The selectivity estimate of index.

sparseboolean

True if index is sparse type.

typestring

Index type.

uniqueboolean

True if index is unique.

expireAfternumber

Index expiry time.

Example response

{
  "code": 200,
  "fields": [
    "_key"
  ],
  "id": "61862387",
  "name": "idx_1723573111790501888",
  "selectivityEstimate": 1,
  "type": "fulltext",
  "unique": true,
  "expireAfter": 3600
}

Changes

No recorded changes to this operation across all 1 revision of this API.