mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 20:15:07 +08:00
style fix
This commit is contained in:
parent
5051a796a0
commit
f38d0d731f
@ -28,7 +28,7 @@ use crate::query_tree::Context as QTContext;
|
|||||||
pub struct SortResult {
|
pub struct SortResult {
|
||||||
pub documents: Vec<Document>,
|
pub documents: Vec<Document>,
|
||||||
pub nb_hits: usize,
|
pub nb_hits: usize,
|
||||||
pub is_exhaustive: bool,
|
pub exhaustive_nb_hit: bool,
|
||||||
pub facets: Option<HashMap<String, HashMap<String, usize>>>,
|
pub facets: Option<HashMap<String, HashMap<String, usize>>>,
|
||||||
pub exhaustive_facet_count: Option<bool>,
|
pub exhaustive_facet_count: Option<bool>,
|
||||||
}
|
}
|
||||||
|
@ -3,17 +3,17 @@ use std::collections::HashMap;
|
|||||||
use std::ops::{Range, Deref};
|
use std::ops::{Range, Deref};
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
|
use either::Either;
|
||||||
|
use sdset::SetOperation;
|
||||||
|
|
||||||
|
use meilisearch_schema::FieldId;
|
||||||
|
|
||||||
use crate::database::MainT;
|
use crate::database::MainT;
|
||||||
use crate::bucket_sort::{bucket_sort, bucket_sort_with_distinct, SortResult};
|
use crate::bucket_sort::{bucket_sort, bucket_sort_with_distinct, SortResult};
|
||||||
use crate::{criterion::Criteria, DocumentId};
|
use crate::{criterion::Criteria, DocumentId};
|
||||||
use crate::{reordered_attrs::ReorderedAttrs, store, MResult};
|
use crate::{reordered_attrs::ReorderedAttrs, store, MResult};
|
||||||
use crate::facets::FacetFilter;
|
use crate::facets::FacetFilter;
|
||||||
|
|
||||||
use either::Either;
|
|
||||||
use sdset::SetOperation;
|
|
||||||
|
|
||||||
use meilisearch_schema::FieldId;
|
|
||||||
|
|
||||||
pub struct QueryBuilder<'c, 'f, 'd, 'i> {
|
pub struct QueryBuilder<'c, 'f, 'd, 'i> {
|
||||||
criteria: Criteria<'c>,
|
criteria: Criteria<'c>,
|
||||||
searchable_attrs: Option<ReorderedAttrs>,
|
searchable_attrs: Option<ReorderedAttrs>,
|
||||||
@ -140,7 +140,6 @@ impl<'c, 'f, 'd, 'i> QueryBuilder<'c, 'f, 'd, 'i> {
|
|||||||
None => None,
|
None => None,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
match self.distinct {
|
match self.distinct {
|
||||||
Some((distinct, distinct_size)) => bucket_sort_with_distinct(
|
Some((distinct, distinct_size)) => bucket_sort_with_distinct(
|
||||||
reader,
|
reader,
|
||||||
|
@ -14,7 +14,7 @@ name = "meilisearch"
|
|||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
#default = ["sentry"]
|
default = ["sentry"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix-cors = "0.2.0"
|
actix-cors = "0.2.0"
|
||||||
|
@ -245,7 +245,7 @@ impl<'a> SearchBuilder<'a> {
|
|||||||
offset: self.offset,
|
offset: self.offset,
|
||||||
limit: self.limit,
|
limit: self.limit,
|
||||||
nb_hits: search_result.nb_hits,
|
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,
|
processing_time_ms: time_ms,
|
||||||
query: self.query.to_string(),
|
query: self.query.to_string(),
|
||||||
facets: search_result.facets,
|
facets: search_result.facets,
|
||||||
|
Loading…
Reference in New Issue
Block a user