File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
quickwit/quickwit-search/src Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ use quickwit_storage::{
3939} ;
4040use tantivy:: aggregation:: agg_req:: { AggregationVariants , Aggregations } ;
4141use tantivy:: aggregation:: { AggContextParams , AggregationLimitsGuard } ;
42+ use tantivy:: collector:: Collector ;
4243use tantivy:: directory:: FileSlice ;
4344use tantivy:: fastfield:: FastFieldReaders ;
4445use tantivy:: schema:: Field ;
@@ -500,15 +501,21 @@ async fn leaf_search_single_split(
500501 let mut collector =
501502 make_collector_for_split ( split_id. clone ( ) , & search_request, agg_context_params) ?;
502503
504+ let predicate_cache = if collector. requires_scoring ( ) {
505+ // at the moment the predicate cache doesn't support scoring
506+ None
507+ } else {
508+ Some ( (
509+ ctx. searcher_context . predicate_cache . clone ( ) as _ ,
510+ split. split_id . clone ( ) ,
511+ ) )
512+ } ;
503513 let split_schema = index. schema ( ) ;
504514 let ( query, mut warmup_info) = ctx. doc_mapper . query (
505515 split_schema. clone ( ) ,
506516 query_ast. clone ( ) ,
507517 false ,
508- Some ( (
509- ctx. searcher_context . predicate_cache . clone ( ) ,
510- split. split_id . clone ( ) ,
511- ) ) ,
518+ predicate_cache,
512519 ) ?;
513520
514521 let collector_warmup_info = collector. warmup_info ( ) ;
You can’t perform that action at this time.
0 commit comments