Index
Create Index
Create an index within the directory associated with the specified API key and return the index_id.
post/api/v1/index
Headers
apikeystring required
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