mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02:00
Before improving fields AttrCount
Removing the fields_count fetching reduced by 2 times the serach time, we should look at lazily pulling them form the criterions in needs ugly-test: Make the fields_count fetching lazy Just before running the exactness criterion
This commit is contained in:
parent
11f3d7782d
commit
ef6a4db182
4 changed files with 79 additions and 60 deletions
|
@ -2,7 +2,7 @@ mod dfa;
|
|||
mod query_enhancer;
|
||||
|
||||
use std::cmp::Reverse;
|
||||
use std::{cmp, vec};
|
||||
use std::{cmp, fmt, vec};
|
||||
|
||||
use fst::{IntoStreamer, Streamer};
|
||||
use levenshtein_automata::DFA;
|
||||
|
@ -68,7 +68,6 @@ impl AutomatonGroup {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Automaton {
|
||||
pub index: usize,
|
||||
pub ngram: usize,
|
||||
|
@ -78,6 +77,14 @@ pub struct Automaton {
|
|||
pub query: String,
|
||||
}
|
||||
|
||||
impl fmt::Debug for Automaton {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("Automaton")
|
||||
.field("query", &self.query)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl Automaton {
|
||||
pub fn dfa(&self) -> DFA {
|
||||
if self.is_prefix {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue