mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-29 18:04:47 +00:00
Switch order of MappedInterner generic params
This commit is contained in:
@ -14,7 +14,7 @@ impl<G: RankingRuleGraphTrait> RankingRuleGraph<G> {
|
||||
&mut self,
|
||||
from: Interned<QueryNode>,
|
||||
cost: u16,
|
||||
all_distances: &MappedInterner<Vec<u16>, QueryNode>,
|
||||
all_distances: &MappedInterner<QueryNode, Vec<u16>>,
|
||||
dead_ends_cache: &mut DeadEndsCache<G::Condition>,
|
||||
mut visit: impl FnMut(
|
||||
&[Interned<G::Condition>],
|
||||
@ -38,7 +38,7 @@ impl<G: RankingRuleGraphTrait> RankingRuleGraph<G> {
|
||||
&mut self,
|
||||
from: Interned<QueryNode>,
|
||||
cost: u16,
|
||||
all_distances: &MappedInterner<Vec<u16>, QueryNode>,
|
||||
all_distances: &MappedInterner<QueryNode, Vec<u16>>,
|
||||
dead_ends_cache: &mut DeadEndsCache<G::Condition>,
|
||||
visit: &mut impl FnMut(
|
||||
&[Interned<G::Condition>],
|
||||
@ -137,7 +137,7 @@ impl<G: RankingRuleGraphTrait> RankingRuleGraph<G> {
|
||||
Ok(any_valid)
|
||||
}
|
||||
|
||||
pub fn initialize_distances_with_necessary_edges(&self) -> MappedInterner<Vec<u16>, QueryNode> {
|
||||
pub fn initialize_distances_with_necessary_edges(&self) -> MappedInterner<QueryNode, Vec<u16>> {
|
||||
let mut distances_to_end = self.query_graph.nodes.map(|_| vec![]);
|
||||
let mut enqueued = SmallBitmap::new(self.query_graph.nodes.len());
|
||||
|
||||
|
@ -114,7 +114,7 @@ pub trait RankingRuleGraphTrait: Sized {
|
||||
paths: &[Vec<Interned<Self::Condition>>],
|
||||
dead_ends_cache: &DeadEndsCache<Self::Condition>,
|
||||
universe: &RoaringBitmap,
|
||||
distances: &MappedInterner<Vec<u16>, QueryNode>,
|
||||
distances: &MappedInterner<QueryNode, Vec<u16>>,
|
||||
cost: u16,
|
||||
logger: &mut dyn SearchLogger<QueryGraph>,
|
||||
);
|
||||
@ -127,7 +127,7 @@ pub trait RankingRuleGraphTrait: Sized {
|
||||
pub struct RankingRuleGraph<G: RankingRuleGraphTrait> {
|
||||
pub query_graph: QueryGraph,
|
||||
pub edges_store: FixedSizeInterner<Option<Edge<G::Condition>>>,
|
||||
pub edges_of_node: MappedInterner<SmallBitmap<Option<Edge<G::Condition>>>, QueryNode>,
|
||||
pub edges_of_node: MappedInterner<QueryNode, SmallBitmap<Option<Edge<G::Condition>>>>,
|
||||
pub conditions_interner: FixedSizeInterner<G::Condition>,
|
||||
}
|
||||
impl<G: RankingRuleGraphTrait> Clone for RankingRuleGraph<G> {
|
||||
|
@ -67,7 +67,7 @@ impl RankingRuleGraphTrait for ProximityGraph {
|
||||
paths: &[Vec<Interned<ProximityCondition>>],
|
||||
dead_ends_cache: &DeadEndsCache<Self::Condition>,
|
||||
universe: &RoaringBitmap,
|
||||
distances: &MappedInterner<Vec<u16>, QueryNode>,
|
||||
distances: &MappedInterner<QueryNode, Vec<u16>>,
|
||||
cost: u16,
|
||||
logger: &mut dyn SearchLogger<QueryGraph>,
|
||||
) {
|
||||
|
@ -138,7 +138,7 @@ impl RankingRuleGraphTrait for TypoGraph {
|
||||
paths: &[Vec<Interned<TypoCondition>>],
|
||||
dead_ends_cache: &DeadEndsCache<TypoCondition>,
|
||||
universe: &RoaringBitmap,
|
||||
distances: &MappedInterner<Vec<u16>, QueryNode>,
|
||||
distances: &MappedInterner<QueryNode, Vec<u16>>,
|
||||
cost: u16,
|
||||
logger: &mut dyn SearchLogger<QueryGraph>,
|
||||
) {
|
||||
|
Reference in New Issue
Block a user