From 452a343a2b30855c881203e5fb258639f5215127 Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Wed, 28 Feb 2024 17:53:54 +0100 Subject: [PATCH] Fix imports --- dump/src/reader/compat/v2_to_v3.rs | 1 - index-scheduler/src/uuid_codec.rs | 1 - meilisearch-auth/src/store.rs | 1 - meilisearch/src/option.rs | 1 - meilisearch/src/routes/api_key.rs | 2 +- meilitool/src/uuid_codec.rs | 1 - milli/src/search/new/query_term/compute_derivations.rs | 5 +++-- milli/src/search/new/query_term/mod.rs | 1 - milli/src/search/new/query_term/parse_query.rs | 8 ++++++-- 9 files changed, 10 insertions(+), 11 deletions(-) diff --git a/dump/src/reader/compat/v2_to_v3.rs b/dump/src/reader/compat/v2_to_v3.rs index 1d4238290..82a3b9e84 100644 --- a/dump/src/reader/compat/v2_to_v3.rs +++ b/dump/src/reader/compat/v2_to_v3.rs @@ -1,4 +1,3 @@ -use std::convert::TryInto; use std::str::FromStr; use time::OffsetDateTime; diff --git a/index-scheduler/src/uuid_codec.rs b/index-scheduler/src/uuid_codec.rs index 54020fa3c..92dc70b0c 100644 --- a/index-scheduler/src/uuid_codec.rs +++ b/index-scheduler/src/uuid_codec.rs @@ -1,5 +1,4 @@ use std::borrow::Cow; -use std::convert::TryInto; use meilisearch_types::heed::{BoxedError, BytesDecode, BytesEncode}; use uuid::Uuid; diff --git a/meilisearch-auth/src/store.rs b/meilisearch-auth/src/store.rs index 276c035b0..1eebd3fe9 100644 --- a/meilisearch-auth/src/store.rs +++ b/meilisearch-auth/src/store.rs @@ -1,7 +1,6 @@ use std::borrow::Cow; use std::cmp::Reverse; use std::collections::HashSet; -use std::convert::{TryFrom, TryInto}; use std::fs::create_dir_all; use std::path::Path; use std::result::Result as StdResult; diff --git a/meilisearch/src/option.rs b/meilisearch/src/option.rs index 27f2d9c41..92d53fd32 100644 --- a/meilisearch/src/option.rs +++ b/meilisearch/src/option.rs @@ -1,4 +1,3 @@ -use std::convert::TryFrom; use std::env::VarError; use std::ffi::OsStr; use std::fmt::Display; diff --git a/meilisearch/src/routes/api_key.rs b/meilisearch/src/routes/api_key.rs index 597d04486..0bd4b9d59 100644 --- a/meilisearch/src/routes/api_key.rs +++ b/meilisearch/src/routes/api_key.rs @@ -10,7 +10,7 @@ use meilisearch_types::deserr::query_params::Param; use meilisearch_types::deserr::{DeserrJsonError, DeserrQueryParamError}; use meilisearch_types::error::deserr_codes::*; use meilisearch_types::error::{Code, ResponseError}; -use meilisearch_types::keys::{Action, CreateApiKey, Key, PatchApiKey}; +use meilisearch_types::keys::{CreateApiKey, Key, PatchApiKey}; use serde::{Deserialize, Serialize}; use time::OffsetDateTime; use uuid::Uuid; diff --git a/meilitool/src/uuid_codec.rs b/meilitool/src/uuid_codec.rs index 54020fa3c..92dc70b0c 100644 --- a/meilitool/src/uuid_codec.rs +++ b/meilitool/src/uuid_codec.rs @@ -1,5 +1,4 @@ use std::borrow::Cow; -use std::convert::TryInto; use meilisearch_types::heed::{BoxedError, BytesDecode, BytesEncode}; use uuid::Uuid; diff --git a/milli/src/search/new/query_term/compute_derivations.rs b/milli/src/search/new/query_term/compute_derivations.rs index d5dfbbcd0..02754929a 100644 --- a/milli/src/search/new/query_term/compute_derivations.rs +++ b/milli/src/search/new/query_term/compute_derivations.rs @@ -6,9 +6,10 @@ use fst::automaton::Str; use fst::{Automaton, IntoStreamer, Streamer}; use heed::types::DecodeIgnore; -use super::*; +use super::{OneTypoTerm, Phrase, QueryTerm, ZeroTypoTerm}; use crate::search::fst_utils::{Complement, Intersection, StartsWith, Union}; -use crate::search::new::query_term::TwoTypoTerm; +use crate::search::new::interner::{DedupInterner, Interned}; +use crate::search::new::query_term::{Lazy, TwoTypoTerm}; use crate::search::new::{limits, SearchContext}; use crate::search::{build_dfa, get_first}; use crate::{Result, MAX_WORD_LENGTH}; diff --git a/milli/src/search/new/query_term/mod.rs b/milli/src/search/new/query_term/mod.rs index 6760c8be7..a37e60ed0 100644 --- a/milli/src/search/new/query_term/mod.rs +++ b/milli/src/search/new/query_term/mod.rs @@ -7,7 +7,6 @@ use std::collections::BTreeSet; use std::iter::FromIterator; use std::ops::RangeInclusive; -use compute_derivations::partially_initialized_term_from_word; use either::Either; pub use ntypo_subset::NTypoTermSubset; pub use parse_query::{located_query_terms_from_tokens, make_ngram, number_of_typos_allowed}; diff --git a/milli/src/search/new/query_term/parse_query.rs b/milli/src/search/new/query_term/parse_query.rs index 865075d97..8ab93ed3b 100644 --- a/milli/src/search/new/query_term/parse_query.rs +++ b/milli/src/search/new/query_term/parse_query.rs @@ -1,7 +1,11 @@ +use std::collections::BTreeSet; + use charabia::normalizer::NormalizedTokenIter; use charabia::{SeparatorKind, TokenKind}; -use super::*; +use super::compute_derivations::partially_initialized_term_from_word; +use super::{LocatedQueryTerm, ZeroTypoTerm}; +use crate::search::new::query_term::{Lazy, Phrase, QueryTerm}; use crate::{Result, SearchContext, MAX_WORD_LENGTH}; /// Convert the tokenised search query into a list of located query terms. @@ -225,7 +229,7 @@ pub fn make_ngram( } struct PhraseBuilder { - words: Vec>>, + words: Vec>>, start: u16, end: u16, }