mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
Cargo fmt
This commit is contained in:
parent
8fdcdee0cc
commit
82313a4444
18 changed files with 35 additions and 42 deletions
|
@ -1,9 +1,6 @@
|
|||
use std::mem;
|
||||
|
||||
use heed::Database;
|
||||
use heed::DatabaseStat;
|
||||
use heed::RoTxn;
|
||||
use heed::Unspecified;
|
||||
use heed::{Database, DatabaseStat, RoTxn, Unspecified};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::BEU32;
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
use heed::{
|
||||
types::{SerdeJson, Str},
|
||||
RoTxn, RwTxn,
|
||||
};
|
||||
use heed::types::{SerdeJson, Str};
|
||||
use heed::{RoTxn, RwTxn};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{index::main_key, Index};
|
||||
use crate::index::main_key;
|
||||
use crate::Index;
|
||||
|
||||
#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Default)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
use std::collections::BTreeSet;
|
||||
use std::collections::HashMap;
|
||||
use std::collections::{BTreeSet, HashMap};
|
||||
use std::convert::Infallible;
|
||||
use std::fmt::Write;
|
||||
use std::{io, str};
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
use std::collections::{BTreeSet, HashSet};
|
||||
|
||||
use deserr::{DeserializeError, Deserr, ValuePointerRef};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::collections::{BTreeSet, HashSet};
|
||||
use utoipa::ToSchema;
|
||||
|
||||
use crate::{
|
||||
attribute_patterns::{match_distinct_field, match_field_legacy, PatternMatch},
|
||||
constants::RESERVED_GEO_FIELD_NAME,
|
||||
AttributePatterns,
|
||||
};
|
||||
use crate::attribute_patterns::{match_distinct_field, match_field_legacy, PatternMatch};
|
||||
use crate::constants::RESERVED_GEO_FIELD_NAME;
|
||||
use crate::AttributePatterns;
|
||||
|
||||
#[derive(Serialize, Deserialize, PartialEq, Eq, Clone, Debug, ToSchema)]
|
||||
#[serde(untagged)]
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
use enum_iterator::Sequence;
|
||||
use std::any::TypeId;
|
||||
use std::borrow::Cow;
|
||||
use std::marker::PhantomData;
|
||||
|
@ -6,6 +5,7 @@ use std::sync::atomic::{AtomicU32, Ordering};
|
|||
use std::sync::{Arc, RwLock};
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
use enum_iterator::Sequence;
|
||||
use indexmap::IndexMap;
|
||||
use itertools::Itertools;
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
use std::collections::VecDeque;
|
||||
|
||||
use heed::types::{Bytes, Unit};
|
||||
use heed::{RoPrefix, RoTxn};
|
||||
use roaring::RoaringBitmap;
|
||||
use rstar::RTree;
|
||||
use std::collections::VecDeque;
|
||||
|
||||
use super::facet_string_values;
|
||||
use super::ranking_rules::{RankingRule, RankingRuleOutput, RankingRuleQueryTrait};
|
||||
|
|
|
@ -47,8 +47,7 @@ use sort::Sort;
|
|||
|
||||
use self::distinct::facet_string_values;
|
||||
use self::geo_sort::GeoSort;
|
||||
pub use self::geo_sort::Parameter as GeoSortParameter;
|
||||
pub use self::geo_sort::Strategy as GeoSortStrategy;
|
||||
pub use self::geo_sort::{Parameter as GeoSortParameter, Strategy as GeoSortStrategy};
|
||||
use self::graph_based_ranking_rule::Words;
|
||||
use self::interner::Interned;
|
||||
use self::vector_sort::VectorSort;
|
||||
|
|
|
@ -4,6 +4,7 @@ use serde_json::Value;
|
|||
|
||||
use crate::attribute_patterns::PatternMatch;
|
||||
use crate::fields_ids_map::metadata::Metadata;
|
||||
use crate::filterable_attributes_rules::match_faceted_field;
|
||||
use crate::update::new::document::Document;
|
||||
use crate::update::new::extract::geo::extract_geo_coordinates;
|
||||
use crate::update::new::extract::perm_json_p;
|
||||
|
@ -11,8 +12,6 @@ use crate::{
|
|||
FieldId, FilterableAttributesRule, GlobalFieldsIdsMap, InternalError, Result, UserError,
|
||||
};
|
||||
|
||||
use crate::filterable_attributes_rules::match_faceted_field;
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn extract_document_facets<'doc>(
|
||||
document: impl Document<'doc>,
|
||||
|
|
|
@ -18,7 +18,8 @@ pub use vectors::EmbeddingExtractor;
|
|||
pub mod perm_json_p {
|
||||
use serde_json::{Map, Value};
|
||||
|
||||
use crate::{attribute_patterns::PatternMatch, Result};
|
||||
use crate::attribute_patterns::PatternMatch;
|
||||
use crate::Result;
|
||||
const SPLIT_SYMBOL: char = '.';
|
||||
|
||||
/// Returns `true` if the `selector` match the `key`.
|
||||
|
|
|
@ -23,8 +23,8 @@ use crate::error::UserError;
|
|||
use crate::fields_ids_map::metadata::{FieldIdMapWithMetadata, MetadataBuilder};
|
||||
use crate::filterable_attributes_rules::match_faceted_field;
|
||||
use crate::index::{
|
||||
ChatConfig, IndexEmbeddingConfig, PrefixSearch,
|
||||
SearchParameters, DEFAULT_MIN_WORD_LEN_ONE_TYPO, DEFAULT_MIN_WORD_LEN_TWO_TYPOS,
|
||||
ChatConfig, IndexEmbeddingConfig, PrefixSearch, SearchParameters,
|
||||
DEFAULT_MIN_WORD_LEN_ONE_TYPO, DEFAULT_MIN_WORD_LEN_TWO_TYPOS,
|
||||
};
|
||||
use crate::order_by_map::OrderByMap;
|
||||
use crate::prompt::{default_max_bytes, default_template_text, PromptData};
|
||||
|
@ -1325,9 +1325,7 @@ impl<'a, 't, 'i> Settings<'a, 't, 'i> {
|
|||
Setting::NotSet => search_parameters.distinct.clone(),
|
||||
},
|
||||
matching_strategy: match matching_strategy {
|
||||
Setting::Set(matching_strategy) => {
|
||||
Some(*matching_strategy)
|
||||
}
|
||||
Setting::Set(matching_strategy) => Some(*matching_strategy),
|
||||
Setting::Reset => None,
|
||||
Setting::NotSet => search_parameters.matching_strategy,
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue