mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 20:09:57 +08:00
Cherry-pick from master pr: #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>
This commit is contained in:
parent
da0bc22a5f
commit
ffa7755136
@ -399,12 +399,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: {
|
||||
@ -412,12 +408,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
Block a user