mirror of https://github.com/milvus-io/milvus.git
fix: Check all values for `trie.predictive_search` (#35943)
Related to #35941 For marisa trie `predictive_search` default behavior, it value iterated is not in lexicographic order. This PR is a brute force fix to make range operator returns correct values. Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>pull/36001/head
parent
9e96ed4873
commit
7b21032d19
|
@ -315,12 +315,8 @@ StringIndexMarisa::Range(std::string value, OpType op) {
|
|||
auto key = std::string(agent.key().ptr(), agent.key().length());
|
||||
if (key > value) {
|
||||
ids.push_back(agent.key().id());
|
||||
break;
|
||||
}
|
||||
};
|
||||
while (trie_.predictive_search(agent)) {
|
||||
ids.push_back(agent.key().id());
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OpType::GreaterEqual: {
|
||||
|
@ -328,12 +324,8 @@ StringIndexMarisa::Range(std::string value, OpType op) {
|
|||
auto key = std::string(agent.key().ptr(), agent.key().length());
|
||||
if (key >= value) {
|
||||
ids.push_back(agent.key().id());
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (trie_.predictive_search(agent)) {
|
||||
ids.push_back(agent.key().id());
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OpType::LessThan: {
|
||||
|
|
Loading…
Reference in New Issue