Property | Type | Description |
---|---|---|
collection_name | String | Collection name |
field_name | String | Field name |
extra_params | Object | Parameters: { index_type: string; metric_type: string; params: string; }; |
Property | Description |
---|---|
error_code | Error code number |
reason | Error cause |
new milvusClient(MILUVS_ADDRESS).collectionManager.createIndex({
collection_name: 'my_collection',
field_name: "vector_01",
extra_params: {
index_type: "IVF_FLAT",
metric_type: "IP",
params: JSON.stringify({ nlist: 10 }),
},
});
Show index information. Current release of Milvus only supports showing latest built index.
Property | Type | Description |
---|---|---|
collection_name | String | Collection name |
Property | Description |
---|---|
status | { error_code: number, reason: string } |
index_descriptions | Index information |
new milvusClient(MILUVS_ADDRESS).indexManager.describeIndex({
collection_name: 'my_collection',
});
Drop an index.
Property | Type | Description |
---|---|---|
collection_name | String | Collection name |
Property | Description |
---|---|
error_code | Error code number |
reason | Error cause |
new milvusClient(MILUVS_ADDRESS).indexManager.dropIndex({
collection_name: 'my_collection',
});
Show index building progress.
Property | Type | Description |
---|---|---|
collection_name | String | Collection name |
Property | Description |
---|---|
status | { error_code: number, reason: string } |
indexed_rows | Row count that successfully built with index |
total_rows | Total row count |
new milvusClient(MILUVS_ADDRESS).indexManager.getIndexBuildProgress({
collection_name: 'my_collection',
});
Show index building state.
Property | Type | Description |
---|---|---|
collection_name | string | Collection name |
Property | Description |
---|---|
status | { error_code: number, reason: string } |
state | Index building state |
new milvusClient(MILUVS_ADDRESS).indexManager.getIndexState({
collection_name: 'my_collection',
});
Create an index on a vector field. Note that index building is an async progress.