-
Notifications
You must be signed in to change notification settings - Fork 0
Index Management
Nikita Ganzikov edited this page Jan 6, 2026
·
1 revision
Indexes are containers for your documents. Each index has a unique ID and a primary key field.
Creates a new search index.
Endpoint: POST /indexes
Query Parameters:
-
id(required) - Unique identifier for the index -
primaryKey(optional) - Field name to use as primary key (default: "id")
Example:
curl -X POST "http://localhost:3000/indexes?id=products&primaryKey=sku"Response: 201 Created
{
"id": "products",
"primaryKey": "sku"
}Updates index configuration.
Endpoint: PATCH /indexes/:id
Request Body:
{
"primaryKey": "newPrimaryKey"
}Example:
curl -X PATCH "http://localhost:3000/indexes/products" \
-H "Content-Type: application/json" \
-d '{"primaryKey": "id"}'Response: 200 OK
{
"id": "products",
"primaryKey": "id"
}Deletes an index and all its documents.
Endpoint: DELETE /indexes/:id
Example:
curl -X DELETE "http://localhost:3000/indexes/products"Response: 204 No Content
- Index IDs must be unique
- Deleting an index removes all associated documents permanently
- Indexes are persisted to disk and automatically recovered on server restart