@@ -354,17 +354,17 @@ def default_text_mapping(dimension: int, method_name: str, **kwargs: Any) -> dic
354
354
355
355
356
356
def default_text_search_query (
357
- query_text : str ,
358
- k : int = 4 ,
359
- text_field : str = Field .CONTENT_KEY .value ,
360
- must : Optional [list [dict ]] = None ,
361
- must_not : Optional [list [dict ]] = None ,
362
- should : Optional [list [dict ]] = None ,
363
- minimum_should_match : int = 0 ,
364
- filters : Optional [list [dict ]] = None ,
365
- routing : Optional [str ] = None ,
366
- routing_field : Optional [str ] = None ,
367
- ** kwargs ,
357
+ query_text : str ,
358
+ k : int = 4 ,
359
+ text_field : str = Field .CONTENT_KEY .value ,
360
+ must : Optional [list [dict ]] = None ,
361
+ must_not : Optional [list [dict ]] = None ,
362
+ should : Optional [list [dict ]] = None ,
363
+ minimum_should_match : int = 0 ,
364
+ filters : Optional [list [dict ]] = None ,
365
+ routing : Optional [str ] = None ,
366
+ routing_field : Optional [str ] = None ,
367
+ ** kwargs ,
368
368
) -> dict :
369
369
if routing is not None :
370
370
query_clause = {
@@ -410,17 +410,17 @@ def default_text_search_query(
410
410
411
411
412
412
def default_vector_search_query (
413
- query_vector : list [float ],
414
- k : int = 4 ,
415
- min_score : str = "0.0" ,
416
- ef_search : Optional [str ] = None , # only for hnsw
417
- nprobe : Optional [str ] = None , # "2000"
418
- reorder_factor : Optional [str ] = None , # "20"
419
- client_refactor : Optional [str ] = None , # "true"
420
- vector_field : str = Field .VECTOR .value ,
421
- filters : Optional [list [dict ]] = None ,
422
- filter_type : Optional [str ] = None ,
423
- ** kwargs ,
413
+ query_vector : list [float ],
414
+ k : int = 4 ,
415
+ min_score : str = "0.0" ,
416
+ ef_search : Optional [str ] = None , # only for hnsw
417
+ nprobe : Optional [str ] = None , # "2000"
418
+ reorder_factor : Optional [str ] = None , # "20"
419
+ client_refactor : Optional [str ] = None , # "true"
420
+ vector_field : str = Field .VECTOR .value ,
421
+ filters : Optional [list [dict ]] = None ,
422
+ filter_type : Optional [str ] = None ,
423
+ ** kwargs ,
424
424
) -> dict :
425
425
if filters is not None :
426
426
filter_type = "post_filter" if filter_type is None else filter_type
@@ -491,7 +491,7 @@ def init_vector(self, dataset: Dataset, attributes: list, embeddings: Embeddings
491
491
"index_type" : index_type ,
492
492
"dimension" : dimension ,
493
493
"distance_type" : distance_type ,
494
- "using_ugc" : using_ugc
494
+ "using_ugc" : using_ugc ,
495
495
}
496
496
dataset .index_struct = json .dumps (index_struct_dict )
497
497
if using_ugc :
0 commit comments