mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Merge two ifs
This commit is contained in:
parent
f6803dd7d1
commit
29e9c74a49
1 changed files with 3 additions and 6 deletions
|
@ -1554,13 +1554,10 @@ fn retrieve_documents<S: AsRef<str>>(
|
|||
})?
|
||||
}
|
||||
|
||||
let mut facet_sort = None;
|
||||
if let Some(sort) = sort_criteria {
|
||||
facet_sort = Some(recursive_facet_sort(index, &rtxn, sort, &candidates)?)
|
||||
}
|
||||
|
||||
let (it, number_of_documents) = if let Some(facet_sort) = &facet_sort {
|
||||
let facet_sort;
|
||||
let (it, number_of_documents) = if let Some(sort) = sort_criteria {
|
||||
let number_of_documents = candidates.len();
|
||||
facet_sort = recursive_facet_sort(index, &rtxn, sort, &candidates)?;
|
||||
let iter = facet_sort.iter()?;
|
||||
(
|
||||
itertools::Either::Left(some_documents(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue