mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-30 09:04:59 +08:00
Update query term structure to allow for laziness
This commit is contained in:
parent
3a818c5e87
commit
9507ff5e31
@ -373,7 +373,7 @@ impl<'ctx, G: RankingRuleGraphTrait> RankingRule<'ctx, QueryGraph> for GraphBase
|
||||
if new_term.is_empty() {
|
||||
nodes_to_remove.push(node_id);
|
||||
} else {
|
||||
term.value = ctx.term_interner.insert(new_term);
|
||||
term.value = ctx.term_interner.push(new_term);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ use resolve_query_graph::{resolve_query_graph, QueryTermDocIdsCache};
|
||||
use roaring::RoaringBitmap;
|
||||
use words::Words;
|
||||
|
||||
use self::interner::Interner;
|
||||
use self::ranking_rules::{BoxRankingRule, RankingRule};
|
||||
use self::sort::Sort;
|
||||
use crate::{
|
||||
@ -46,7 +47,7 @@ pub struct SearchContext<'ctx> {
|
||||
pub db_cache: DatabaseCache<'ctx>,
|
||||
pub word_interner: DedupInterner<String>,
|
||||
pub phrase_interner: DedupInterner<Phrase>,
|
||||
pub term_interner: DedupInterner<QueryTerm>,
|
||||
pub term_interner: Interner<QueryTerm>,
|
||||
// think about memory usage of that field (roaring bitmaps in a hashmap)
|
||||
pub term_docids: QueryTermDocIdsCache,
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -128,7 +128,7 @@ impl RankingRuleGraphTrait for TypoGraph {
|
||||
nbr_typos as u8 + base_cost,
|
||||
Some(
|
||||
conditions_interner
|
||||
.insert(TypoCondition { term: term_interner.insert(new_term) }),
|
||||
.insert(TypoCondition { term: term_interner.push(new_term) }),
|
||||
),
|
||||
))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user