Skip to content

Commit

Permalink
add sparse support type (#635)
Browse files Browse the repository at this point in the history
Signed-off-by: cqy123456 <[email protected]>
  • Loading branch information
cqy123456 authored Jun 5, 2024
1 parent 835018f commit d204709
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/knowhere/comp/knowhere_check.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ IndexTypeAndDataTypeCheck(const std::string& index_name, VecType data_type) {
case VecType::VECTOR_FLOAT16:
return index_factory.HasIndex<fp16>(index_name);
case VecType::VECTOR_SPARSE_FLOAT:
if (index_name != IndexEnum::INDEX_SPARSE_INVERTED_INDEX && index_name != IndexEnum::INDEX_SPARSE_WAND) {
if (index_name != IndexEnum::INDEX_SPARSE_INVERTED_INDEX && index_name != IndexEnum::INDEX_SPARSE_WAND &&
index_name != IndexEnum::INDEX_HNSW) {
return false;
} else {
return index_factory.HasIndex<fp32>(index_name);
Expand Down

0 comments on commit d204709

Please sign in to comment.