Apply suggestions from code review

Co-authored-by: Clément Renault <clement@meilisearch.com>
This commit is contained in:
Irevoire 2021-09-09 12:20:08 +02:00 committed by Tamo
parent c81ff22c5b
commit a84f3a8b31
No known key found for this signature in database
GPG key ID: 20CD8020AFA88D69
13 changed files with 77 additions and 69 deletions

View file

@ -695,7 +695,7 @@ async fn main() -> anyhow::Result<()> {
struct QueryBody {
query: Option<String>,
filters: Option<String>,
sorters: Option<String>,
sort: Option<String>,
facet_filters: Option<Vec<UntaggedEither<Vec<String>, String>>>,
facet_distribution: Option<bool>,
limit: Option<usize>,
@ -755,7 +755,7 @@ async fn main() -> anyhow::Result<()> {
search.limit(limit);
}
if let Some(sort) = query.sorters {
if let Some(sort) = query.sort {
search.sort_criteria(vec![sort.parse().unwrap()]);
}