Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce index_feature for all index #154

Open
LHT129 opened this issue Nov 21, 2024 · 1 comment
Open

Introduce index_feature for all index #154

LHT129 opened this issue Nov 21, 2024 · 1 comment
Assignees
Labels
kind/documentation Improvements or additions to documentation kind/feature New feature or request

Comments

@LHT129
Copy link
Collaborator

LHT129 commented Nov 21, 2024

The characteristics of each index are often different. Users often want to know the specific characteristics of the index, such as whether it supports adding data from empty index, whether it supports deletion, whether it supports concurrent search and insertion, etc.

In fact, the internal functions of each index should also be implemented according to the characteristic granularity, which is also convenient for testing and verification, and is more friendly to developers.

Therefore, we provide an enum of all characteristics in the external interface, and at the same time provide interface methods for printing the characteristics of the current index for a specific index

enum class IndexFeature {
     SUPPORT_ADD_WITHOUT_TRAIN = 1,
     SUPPOET_DELETE_BY_ID = 2,
     ...
}
std::vector<Feature> Index::GetFeatures();
bool Index::CheckFeature(IndexFeature feature);

the related pull requests:
#199
#210

todo:

  • add feature object
  • introduce it to all kinds of index
  • use the feature to check and reconstruct some test
@LHT129 LHT129 added kind/documentation Improvements or additions to documentation kind/feature New feature or request labels Nov 21, 2024
@wxyucs
Copy link
Collaborator

wxyucs commented Nov 21, 2024

sounds good, will it also available in the pyvsag?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Improvements or additions to documentation kind/feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants