From b41a6cbd7a30071d842cb0ac019d7ec454148842 Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Wed, 26 Apr 2023 16:28:17 +0200 Subject: [PATCH] Check sort criteria also in placeholder search --- milli/src/search/new/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/milli/src/search/new/mod.rs b/milli/src/search/new/mod.rs index e9518bad5..375f7c774 100644 --- a/milli/src/search/new/mod.rs +++ b/milli/src/search/new/mod.rs @@ -330,6 +330,8 @@ pub fn execute_search( ctx.index.documents_ids(ctx.txn)? }; + check_sort_criteria(ctx, sort_criteria.as_ref())?; + let mut located_query_terms = None; let bucket_sort_output = if let Some(query) = query { // We make sure that the analyzer is aware of the stop words @@ -352,8 +354,6 @@ pub fn execute_search( let graph = QueryGraph::from_query(ctx, &query_terms)?; located_query_terms = Some(query_terms); - check_sort_criteria(ctx, sort_criteria.as_ref())?; - let ranking_rules = get_ranking_rules_for_query_graph_search(ctx, sort_criteria, terms_matching_strategy)?;