create_index
Create an index on a collection field to accelerate vector or scalar queries. Choose from HNSW, Flat, IVF, or inverted index types.
Instructions
Create an index on a field to accelerate queries.
Use HnswIndexParamInput / FlatIndexParamInput / IVFIndexParamInput for vector fields, and InvertIndexParamInput for scalar fields.
Args: params (CreateIndexInput): Validated input parameters containing: - collection_name (str): Collection identifier - field_name (str): Name of the field to index - index_param: One of HnswIndexParamInput, FlatIndexParamInput, IVFIndexParamInput, or InvertIndexParamInput (use 'type' field as discriminator)
Returns: str: Success message or error message
Examples: - Use when: "Create an HNSW index on the embedding field" - Use when: "Build an inverted index on the category scalar field"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |