collections
Create a new collection
When a collection is created, we give it a name and describe the fields that will be indexed from the documents added to the collection.
post/collections
Request body
Example request
{
"name": "companies",
"fields": [
{
"name": "company_name",
"type": "string",
"facet": false
},
{
"name": "num_employees",
"type": "int32",
"facet": false
},
{
"name": "country",
"type": "string",
"facet": true
}
],
"default_sorting_field": "num_employees"
}Response
Collection successfully created
Example response
{
"name": "companies",
"fields": [
{
"name": "company_name",
"type": "string",
"facet": false
},
{
"name": "num_employees",
"type": "int32",
"facet": false
},
{
"name": "country",
"type": "string",
"facet": true
}
],
"default_sorting_field": "num_employees"
}