Skip to content

Commit ff51ccd

Browse files
committed
[feat][index] Add DiskAnn vector type
1 parent e50cd63 commit ff51ccd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/server/index_service.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,8 @@ static butil::Status ValidateVectorAddRequest(StoragePtr storage, const pb::inde
405405
vector_index_wrapper->Type() == pb::common::VectorIndexType::VECTOR_INDEX_TYPE_FLAT ||
406406
vector_index_wrapper->Type() == pb::common::VectorIndexType::VECTOR_INDEX_TYPE_BRUTEFORCE ||
407407
vector_index_wrapper->Type() == pb::common::VectorIndexType::VECTOR_INDEX_TYPE_IVF_FLAT ||
408-
vector_index_wrapper->Type() == pb::common::VectorIndexType::VECTOR_INDEX_TYPE_IVF_PQ) {
408+
vector_index_wrapper->Type() == pb::common::VectorIndexType::VECTOR_INDEX_TYPE_IVF_PQ ||
409+
vector_index_wrapper->Type() == pb::common::VectorIndexType::VECTOR_INDEX_TYPE_DISKANN) {
409410
if (vector.vector().float_values().size() != dimension) {
410411
return butil::Status(
411412
pb::error::EILLEGAL_PARAMTETERS,
@@ -2611,7 +2612,8 @@ static butil::Status ValidateIndexTxnPrewriteRequest(StoragePtr storage, const p
26112612
vector_index_wrapper->Type() == pb::common::VectorIndexType::VECTOR_INDEX_TYPE_FLAT ||
26122613
vector_index_wrapper->Type() == pb::common::VectorIndexType::VECTOR_INDEX_TYPE_BRUTEFORCE ||
26132614
vector_index_wrapper->Type() == pb::common::VectorIndexType::VECTOR_INDEX_TYPE_IVF_FLAT ||
2614-
vector_index_wrapper->Type() == pb::common::VectorIndexType::VECTOR_INDEX_TYPE_IVF_PQ) {
2615+
vector_index_wrapper->Type() == pb::common::VectorIndexType::VECTOR_INDEX_TYPE_IVF_PQ ||
2616+
vector_index_wrapper->Type() == pb::common::VectorIndexType::VECTOR_INDEX_TYPE_DISKANN) {
26152617
if (BAIDU_UNLIKELY(vector.vector().float_values().size() != dimension)) {
26162618
return butil::Status(
26172619
pb::error::EILLEGAL_PARAMTETERS,

0 commit comments

Comments
 (0)