mirror of https://github.com/milvus-io/milvus.git
feat: [2.4] support range search pagination retains order (#35739)
issue: https://github.com/milvus-io/milvus/issues/35464 pr: https://github.com/milvus-io/milvus/pull/35738pull/35817/head
parent
50ec3dd4db
commit
5da64f6d5a
|
@ -44,6 +44,7 @@ const char OFFSET_MAPPING_NAME[] = "offset_mapping";
|
|||
const char NUM_CLUSTERS[] = "num_clusters";
|
||||
const char KMEANS_CLUSTER[] = "KMEANS";
|
||||
const char VEC_OPT_FIELDS[] = "opt_fields";
|
||||
const char PAGE_RETAIN_ORDER[] = "page_retain_order";
|
||||
|
||||
const char DEFAULT_PLANNODE_ID[] = "0";
|
||||
const char DEAFULT_QUERY_ID[] = "0";
|
||||
|
|
|
@ -383,6 +383,14 @@ VectorDiskAnnIndex<T>::Query(const DatasetPtr dataset,
|
|||
search_config[RANGE_FILTER],
|
||||
GetMetricType());
|
||||
}
|
||||
|
||||
auto page_retain_order = GetValueFromConfig<bool>(
|
||||
search_info.search_params_, PAGE_RETAIN_ORDER);
|
||||
if (page_retain_order.has_value()) {
|
||||
search_config[knowhere::meta::RETAIN_ITERATOR_ORDER] =
|
||||
page_retain_order.value();
|
||||
}
|
||||
|
||||
auto res = index_.RangeSearch(dataset, search_config, bitset);
|
||||
|
||||
if (!res.has_value()) {
|
||||
|
|
Loading…
Reference in New Issue