mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-29 08:14:26 +01:00
fmt
This commit is contained in:
parent
4eef0cd332
commit
106cc7fe3a
@ -1,18 +1,16 @@
|
|||||||
use once_cell::sync::Lazy;
|
|
||||||
use regex::Regex;
|
|
||||||
use serde_json::{json, Value};
|
|
||||||
use std::collections::{BTreeSet, BinaryHeap, HashMap};
|
use std::collections::{BTreeSet, BinaryHeap, HashMap};
|
||||||
|
|
||||||
use meilisearch_types::locales::Locale;
|
use meilisearch_types::locales::Locale;
|
||||||
|
use once_cell::sync::Lazy;
|
||||||
|
use regex::Regex;
|
||||||
|
use serde_json::{json, Value};
|
||||||
|
|
||||||
use crate::{
|
use crate::aggregate_methods;
|
||||||
aggregate_methods,
|
use crate::analytics::{Aggregate, AggregateMethod};
|
||||||
analytics::{Aggregate, AggregateMethod},
|
use crate::search::{
|
||||||
search::{
|
|
||||||
SearchQuery, SearchResult, DEFAULT_CROP_LENGTH, DEFAULT_CROP_MARKER,
|
SearchQuery, SearchResult, DEFAULT_CROP_LENGTH, DEFAULT_CROP_MARKER,
|
||||||
DEFAULT_HIGHLIGHT_POST_TAG, DEFAULT_HIGHLIGHT_PRE_TAG, DEFAULT_SEARCH_LIMIT,
|
DEFAULT_HIGHLIGHT_POST_TAG, DEFAULT_HIGHLIGHT_PRE_TAG, DEFAULT_SEARCH_LIMIT,
|
||||||
DEFAULT_SEMANTIC_RATIO,
|
DEFAULT_SEMANTIC_RATIO,
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
aggregate_methods!(
|
aggregate_methods!(
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
use super::settings_analytics::*;
|
|
||||||
use actix_web::web::Data;
|
use actix_web::web::Data;
|
||||||
use actix_web::{web, HttpRequest, HttpResponse};
|
use actix_web::{web, HttpRequest, HttpResponse};
|
||||||
use deserr::actix_web::AwebJson;
|
use deserr::actix_web::AwebJson;
|
||||||
@ -11,6 +10,7 @@ use meilisearch_types::settings::{settings, SecretPolicy, Settings, Unchecked};
|
|||||||
use meilisearch_types::tasks::KindWithContent;
|
use meilisearch_types::tasks::KindWithContent;
|
||||||
use tracing::debug;
|
use tracing::debug;
|
||||||
|
|
||||||
|
use super::settings_analytics::*;
|
||||||
use crate::analytics::Analytics;
|
use crate::analytics::Analytics;
|
||||||
use crate::extractors::authentication::policies::*;
|
use crate::extractors::authentication::policies::*;
|
||||||
use crate::extractors::authentication::GuardedData;
|
use crate::extractors::authentication::GuardedData;
|
||||||
|
@ -3,15 +3,16 @@
|
|||||||
//! through the sub-settings route directly without any manipulation.
|
//! through the sub-settings route directly without any manipulation.
|
||||||
//! This is why we often use a `Option<&Vec<_>>` instead of a `Option<&[_]>`.
|
//! This is why we often use a `Option<&Vec<_>>` instead of a `Option<&[_]>`.
|
||||||
|
|
||||||
|
use std::collections::{BTreeMap, BTreeSet, HashSet};
|
||||||
|
|
||||||
|
use meilisearch_types::facet_values_sort::FacetValuesSort;
|
||||||
use meilisearch_types::locales::{Locale, LocalizedAttributesRuleView};
|
use meilisearch_types::locales::{Locale, LocalizedAttributesRuleView};
|
||||||
use meilisearch_types::milli::update::Setting;
|
use meilisearch_types::milli::update::Setting;
|
||||||
use meilisearch_types::milli::vector::settings::EmbeddingSettings;
|
use meilisearch_types::milli::vector::settings::EmbeddingSettings;
|
||||||
use meilisearch_types::settings::{
|
use meilisearch_types::settings::{
|
||||||
FacetingSettings, PaginationSettings, ProximityPrecisionView, TypoSettings,
|
FacetingSettings, PaginationSettings, ProximityPrecisionView, RankingRuleView, TypoSettings,
|
||||||
};
|
};
|
||||||
use meilisearch_types::{facet_values_sort::FacetValuesSort, settings::RankingRuleView};
|
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
use std::collections::{BTreeMap, BTreeSet, HashSet};
|
|
||||||
|
|
||||||
use crate::analytics::Aggregate;
|
use crate::analytics::Aggregate;
|
||||||
|
|
||||||
|
@ -4,11 +4,9 @@ use once_cell::sync::Lazy;
|
|||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use serde_json::{json, Value};
|
use serde_json::{json, Value};
|
||||||
|
|
||||||
use crate::{
|
use crate::aggregate_methods;
|
||||||
aggregate_methods,
|
use crate::analytics::{Aggregate, AggregateMethod};
|
||||||
analytics::{Aggregate, AggregateMethod},
|
use crate::search::{SimilarQuery, SimilarResult};
|
||||||
search::{SimilarQuery, SimilarResult},
|
|
||||||
};
|
|
||||||
|
|
||||||
aggregate_methods!(
|
aggregate_methods!(
|
||||||
SimilarPOST => "Similar POST",
|
SimilarPOST => "Similar POST",
|
||||||
|
@ -9,6 +9,7 @@ use meilisearch_types::keys::actions;
|
|||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
use tracing::debug;
|
use tracing::debug;
|
||||||
|
|
||||||
|
use super::multi_search_analytics::MultiSearchAggregator;
|
||||||
use crate::analytics::Analytics;
|
use crate::analytics::Analytics;
|
||||||
use crate::error::MeilisearchHttpError;
|
use crate::error::MeilisearchHttpError;
|
||||||
use crate::extractors::authentication::policies::ActionPolicy;
|
use crate::extractors::authentication::policies::ActionPolicy;
|
||||||
@ -21,8 +22,6 @@ use crate::search::{
|
|||||||
};
|
};
|
||||||
use crate::search_queue::SearchQueue;
|
use crate::search_queue::SearchQueue;
|
||||||
|
|
||||||
use super::multi_search_analytics::MultiSearchAggregator;
|
|
||||||
|
|
||||||
pub fn configure(cfg: &mut web::ServiceConfig) {
|
pub fn configure(cfg: &mut web::ServiceConfig) {
|
||||||
cfg.service(web::resource("").route(web::post().to(SeqHandler(multi_search_with_post))));
|
cfg.service(web::resource("").route(web::post().to(SeqHandler(multi_search_with_post))));
|
||||||
}
|
}
|
||||||
|
@ -2,10 +2,8 @@ use std::collections::HashSet;
|
|||||||
|
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
|
|
||||||
use crate::{
|
use crate::analytics::Aggregate;
|
||||||
analytics::Aggregate,
|
use crate::search::{FederatedSearch, SearchQueryWithIndex};
|
||||||
search::{FederatedSearch, SearchQueryWithIndex},
|
|
||||||
};
|
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct MultiSearchAggregator {
|
pub struct MultiSearchAggregator {
|
||||||
|
@ -9,8 +9,7 @@ use urlencoding::encode as urlencode;
|
|||||||
|
|
||||||
use super::encoder::Encoder;
|
use super::encoder::Encoder;
|
||||||
use super::service::Service;
|
use super::service::Service;
|
||||||
use super::Value;
|
use super::{Owned, Shared, Value};
|
||||||
use super::{Owned, Shared};
|
|
||||||
use crate::json;
|
use crate::json;
|
||||||
|
|
||||||
pub struct Index<'a, State = Owned> {
|
pub struct Index<'a, State = Owned> {
|
||||||
|
Loading…
Reference in New Issue
Block a user