Create Index
Create an index within the directory associated with the specified API key and return the index_id.
Headers
YOUR_SECRET_API_KEY
Request body
Example request
{
"index_name": "demo_index",
"schema": [
{
"field": "title",
"field_type": "Text",
"store": true,
"index_lexical": true,
"boost": 10
},
{
"field": "body",
"field_type": "Text",
"store": true,
"index_lexical": true,
"longest": true
},
{
"field": "url",
"field_type": "Text",
"store": true,
"index_lexical": false
},
{
"field": "date",
"field_type": "Timestamp",
"store": true,
"index_lexical": false,
"facet": true
}
],
"synonyms": [
{
"terms": [
"berry",
"lingonberry",
"blueberry",
"gooseberry"
],
"multiway": false
}
]
}Response
Index created, returns the index_id
Changes
Changed in 3 of the 11 revisions of this API.114
- ▲
removed the enum value
PotionCode16Mof the request propertyinference/oneOf[subschema #1]/Model2Vec/modelrequest-property-enum-value-removed
- ○
added the new
PotionCode16MV2enum value to the request propertyinference/oneOf[subschema #1]/Model2Vec/modelrequest-property-enum-value-added
- ▲
- ●
removed the request property
force_shard_numberrequest-property-removed
- ○
api operation id
create_index_apiremoved and replaced withcreate_indexapi-operation-id-removed
- ●
- ○
api operation id
create_indexremoved and replaced withcreate_index_apiapi-operation-id-removed
- ○
added the new optional request property
force_shard_numbernew-optional-request-property
- ○