Indexes

Create payload index

PUT
Creates a payload index for a field in the specified collection.

Path parameters

collection_namestringRequired
Name of the collection

Query parameters

waitbooleanOptional
If true, wait for changes to actually happen
orderingenumOptional
define ordering guarantees for the operation
Allowed values: weakmediumstrong

Request

This endpoint expects an object.
field_name
stringRequired
field_schema
unionOptional

Response

This endpoint returns an object
time
doubleOptional
Time spent to process this request
status
stringOptional
result
objectOptional
PUT
1curl -X PUT http://localhost:6333/collections/collection_name/index \
2 -H "api-key: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "field_name": "field_name"
6}'
200Updated
1{
2 "time": 1.1,
3 "status": "status",
4 "result": {
5 "status": "acknowledged",
6 "operation_id": 1
7 }
8}