From f38d0d731ff86afcc9b4f15cdc4bc2a665bba6b3 Mon Sep 17 00:00:00 2001 From: mpostma Date: Tue, 12 May 2020 14:36:28 +0200 Subject: [PATCH] style fix --- meilisearch-core/src/bucket_sort.rs | 2 +- meilisearch-core/src/query_builder.rs | 11 +++++------ meilisearch-http/Cargo.toml | 2 +- meilisearch-http/src/helpers/meilisearch.rs | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/meilisearch-core/src/bucket_sort.rs b/meilisearch-core/src/bucket_sort.rs index 337bd8cce..4fd6b3080 100644 --- a/meilisearch-core/src/bucket_sort.rs +++ b/meilisearch-core/src/bucket_sort.rs @@ -28,7 +28,7 @@ use crate::query_tree::Context as QTContext; pub struct SortResult { pub documents: Vec, pub nb_hits: usize, - pub is_exhaustive: bool, + pub exhaustive_nb_hit: bool, pub facets: Option>>, pub exhaustive_facet_count: Option, } diff --git a/meilisearch-core/src/query_builder.rs b/meilisearch-core/src/query_builder.rs index 69a1ceff6..1f1ef28e3 100644 --- a/meilisearch-core/src/query_builder.rs +++ b/meilisearch-core/src/query_builder.rs @@ -3,17 +3,17 @@ use std::collections::HashMap; use std::ops::{Range, Deref}; use std::time::Duration; +use either::Either; +use sdset::SetOperation; + +use meilisearch_schema::FieldId; + use crate::database::MainT; use crate::bucket_sort::{bucket_sort, bucket_sort_with_distinct, SortResult}; use crate::{criterion::Criteria, DocumentId}; use crate::{reordered_attrs::ReorderedAttrs, store, MResult}; use crate::facets::FacetFilter; -use either::Either; -use sdset::SetOperation; - -use meilisearch_schema::FieldId; - pub struct QueryBuilder<'c, 'f, 'd, 'i> { criteria: Criteria<'c>, searchable_attrs: Option, @@ -140,7 +140,6 @@ impl<'c, 'f, 'd, 'i> QueryBuilder<'c, 'f, 'd, 'i> { None => None, }; - match self.distinct { Some((distinct, distinct_size)) => bucket_sort_with_distinct( reader, diff --git a/meilisearch-http/Cargo.toml b/meilisearch-http/Cargo.toml index 6b4c95514..8e4876397 100644 --- a/meilisearch-http/Cargo.toml +++ b/meilisearch-http/Cargo.toml @@ -14,7 +14,7 @@ name = "meilisearch" path = "src/main.rs" [features] -#default = ["sentry"] +default = ["sentry"] [dependencies] actix-cors = "0.2.0" diff --git a/meilisearch-http/src/helpers/meilisearch.rs b/meilisearch-http/src/helpers/meilisearch.rs index d944adf3b..10fdd9c21 100644 --- a/meilisearch-http/src/helpers/meilisearch.rs +++ b/meilisearch-http/src/helpers/meilisearch.rs @@ -245,7 +245,7 @@ impl<'a> SearchBuilder<'a> { offset: self.offset, limit: self.limit, nb_hits: search_result.nb_hits, - exhaustive_nb_hits: search_result.is_exhaustive, + exhaustive_nb_hits: search_result.exhaustive_nb_hit, processing_time_ms: time_ms, query: self.query.to_string(), facets: search_result.facets,