MEP 12 -- Support index name for creating index
PRs:
Keywords: index name
Released:
Summary
Currently, custom index name is not supported when creating an index. Users cannot build multiple indexes on the same vector column. It will replace the existing index when users create a new index. If users want to query through the new index, they can only drop the existing index and then create an new index.
This proposal is about:
- Users can specify the index name when create an index or drop an index.
- Users can create multiple indexes on the same vector index.
- When creating a new index, the existing index will not be replaced, but will coexist.
- Users can freely switch between different indexes to search.(Not supported by this plan)
Motivation
- Users can specify index name when create an index or drop an index.
- Users can create multiple indexes on the same vector index.
- Users can freely switch between different indexes to search.(Not supported by this plan)
- The user can specify the index type when loading. (Not supported by this plan)
Public Interfaces
CreateIndex and DropIndex interfaces should add a parameter: IndexName.
DescribeIndex should return all index information.
Changes to existing APIs
message CreateIndexRequest { common.MsgBase base = 1; // must string db_name = 2; string collection_name = 3; // must string field_name = 4; // must //New string index_name = 5; repeated common.KeyValuePair extra_params = 6; // must } message DescribeIndexRequest { common.MsgBase base = 1; // must string db_name = 2; string collection_name = 3; // must string field_name = 4; //Need to delete string index_name = 5; // No need to set up for now @2021.06.30 } message DropIndexRequest { common.MsgBase base = 1; // must string db_name = 2; string collection_name = 3; // must string field_name = 4; string index_name = 5; // No need to set up for now @2021.06.30 }
Design Details
- Add a parameter to the CreateIndex interface.
- DescribeIndex returns all index information.
- DropIndex already has indexName parameter, no need to modify.
- Add index_name parameter to the create_index interface of pymilvus, default value is "".
- Add a parameter to the Load interface. (Need to discuss)
Compatibility, Deprecation, and Migration Plan
Test Plan
Unit tests
CI tests