Current state: "Under Discussion"

ISSUE:  #6330 #6730

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:



Motivation

  1. Users can specify index name when create an index or drop an index.
  2. Users can create multiple indexes on the same vector index.
  3. Users can freely switch between different indexes to search.(Not supported by this plan)
  4. 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

  1. Add a parameter to the CreateIndex interface.
  2. DescribeIndex returns all index information.
  3. DropIndex already has indexName parameter, no need to modify.
  4. Add index_name parameter to the create_index interface of pymilvus, default value is "".
  5. Add a parameter to the Load interface. (Need to discuss)


Compatibility, Deprecation, and Migration Plan

Test Plan

References