Check sort criteria also in placeholder search

This commit is contained in:
Louis Dureuil 2023-04-26 16:28:17 +02:00
parent c8af572697
commit b41a6cbd7a
No known key found for this signature in database

View File

@ -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)?;