@@ -4,7 +4,7 @@ use qdrant_client::Payload;
44use qdrant_client:: qdrant:: r#match:: MatchValue ;
55use qdrant_client:: qdrant:: quantization_config:: Quantization ;
66use qdrant_client:: qdrant:: {
7- BinaryQuantization , Distance , FieldCondition , Filter , HnswConfigDiff , Match , MultiVectorConfig ,
7+ BinaryQuantization , Condition , Distance , Filter , HnswConfigDiff , MultiVectorConfig ,
88 ProductQuantization , QuantizationConfig , ScalarQuantization , SparseIndexConfig ,
99 SparseVectorParams , VectorParams ,
1010} ;
@@ -478,24 +478,11 @@ pub fn random_filter(keywords: Option<usize>) -> Option<Filter> {
478478 let mut have_any = false ;
479479 if let Some ( keyword_variants) = keywords {
480480 have_any = true ;
481- filter. must . push (
482- FieldCondition {
483- key : KEYWORD_PAYLOAD_KEY . to_string ( ) ,
484- r#match : Some ( Match {
485- match_value : Some ( MatchValue :: Keyword ( random_keyword (
486- & mut rng,
487- keyword_variants,
488- ) ) ) ,
489- } ) ,
490- range : None ,
491- geo_bounding_box : None ,
492- geo_radius : None ,
493- values_count : None ,
494- geo_polygon : None ,
495- datetime_range : None ,
496- }
497- . into ( ) ,
498- )
481+
482+ filter. must . push ( Condition :: matches (
483+ KEYWORD_PAYLOAD_KEY ,
484+ MatchValue :: Keyword ( random_keyword ( & mut rng, keyword_variants) ) ,
485+ ) ) ;
499486 }
500487 if have_any { Some ( filter) } else { None }
501488}
0 commit comments