mirror of https://github.com/milvus-io/milvus.git
				
				
				
			feat: support range search pagination retains order (#35738)
issue: #35464 Signed-off-by: Patrick Weizhi Xu <weizhi.xu@zilliz.com>pull/35815/head
							parent
							
								
									73be0ba941
								
							
						
					
					
						commit
						b3089b5bdc
					
				| 
						 | 
				
			
			@ -45,6 +45,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";
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -282,6 +282,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