yx-keith commented on code in PR #64226:
URL: https://github.com/apache/doris/pull/64226#discussion_r3384959397


##########
be/src/storage/index/ann/faiss_ann_index.cpp:
##########
@@ -704,7 +705,10 @@ doris::Status FaissVectorIndex::ann_topn_search(const 
float* query_vec, int k,
                     "IVF search parameters should not be null for IVF index");
         }
         faiss::SearchParametersIVF* param = new faiss::SearchParametersIVF();
-        param->nprobe = ivf_params->nprobe;
+        // FAISS asserts nprobe > 0, so the lower bound guards against a crash 
on
+        // nprobe < 1. nprobe > nlist is harmless (FAISS caps it at nlist 
internally);
+        // we clamp the upper bound only to keep the value semantically 
meaningful.

Review Comment:
   I have resolved this



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to