Working with full-text indexes
Create a full-text index
POST
/_db/{database-name}/_api/index
The fulltext index type is deprecated from version 3.10 onwards.
Creates a fulltext index for the collection collection-name
, if
it does not already exist. The call expects an object containing the index
details.
HTTP Headers
Request Body application/json object
Examples
Creating a fulltext index
curl -X POST --header 'accept: application/json' --data-binary @- --dump - 'http://localhost:8529/_api/index?collection=products' <<'EOF'
{
"type": "fulltext",
"fields": [
"text"
]
}
EOF