mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-31 02:40:01 +00:00
Make clippy happy
This commit is contained in:
@ -43,9 +43,9 @@ impl<G: RankingRuleGraphTrait> ConditionDocIdsCache<G> {
|
||||
///
|
||||
/// If the cache does not yet contain these docids, they are computed
|
||||
/// and inserted in the cache.
|
||||
pub fn get_condition_docids<'s, 'ctx>(
|
||||
pub fn get_condition_docids<'s>(
|
||||
&'s mut self,
|
||||
ctx: &mut SearchContext<'ctx>,
|
||||
ctx: &mut SearchContext,
|
||||
interned_condition: Interned<G::Condition>,
|
||||
graph: &mut RankingRuleGraph<G>,
|
||||
universe: &RoaringBitmap,
|
||||
|
@ -77,22 +77,19 @@ pub trait RankingRuleGraphTrait: Sized {
|
||||
|
||||
/// Return the label of the given edge condition, to be used when visualising
|
||||
/// the ranking rule graph.
|
||||
fn label_for_condition<'ctx>(
|
||||
ctx: &mut SearchContext<'ctx>,
|
||||
condition: &Self::Condition,
|
||||
) -> Result<String>;
|
||||
fn label_for_condition(ctx: &mut SearchContext, condition: &Self::Condition) -> Result<String>;
|
||||
|
||||
/// Compute the document ids associated with the given edge condition,
|
||||
/// restricted to the given universe.
|
||||
fn resolve_condition<'ctx>(
|
||||
ctx: &mut SearchContext<'ctx>,
|
||||
fn resolve_condition(
|
||||
ctx: &mut SearchContext,
|
||||
condition: &Self::Condition,
|
||||
universe: &RoaringBitmap,
|
||||
) -> Result<(RoaringBitmap, FxHashSet<Interned<String>>, FxHashSet<Interned<Phrase>>)>;
|
||||
|
||||
/// Return the costs and conditions of the edges going from the source node to the destination node
|
||||
fn build_edges<'ctx>(
|
||||
ctx: &mut SearchContext<'ctx>,
|
||||
fn build_edges(
|
||||
ctx: &mut SearchContext,
|
||||
conditions_interner: &mut DedupInterner<Self::Condition>,
|
||||
source_node: &QueryNode,
|
||||
dest_node: &QueryNode,
|
||||
|
@ -7,8 +7,8 @@ use crate::search::new::query_term::LocatedQueryTerm;
|
||||
use crate::search::new::{QueryNode, SearchContext};
|
||||
use crate::Result;
|
||||
|
||||
pub fn build_edges<'ctx>(
|
||||
_ctx: &mut SearchContext<'ctx>,
|
||||
pub fn build_edges(
|
||||
_ctx: &mut SearchContext,
|
||||
conditions_interner: &mut DedupInterner<ProximityCondition>,
|
||||
from_node: &QueryNode,
|
||||
to_node: &QueryNode,
|
||||
|
@ -13,8 +13,8 @@ use fxhash::FxHashSet;
|
||||
use heed::RoTxn;
|
||||
use roaring::RoaringBitmap;
|
||||
|
||||
pub fn compute_docids<'ctx>(
|
||||
ctx: &mut SearchContext<'ctx>,
|
||||
pub fn compute_docids(
|
||||
ctx: &mut SearchContext,
|
||||
condition: &ProximityCondition,
|
||||
universe: &RoaringBitmap,
|
||||
) -> Result<(RoaringBitmap, FxHashSet<Interned<String>>, FxHashSet<Interned<Phrase>>)> {
|
||||
|
@ -29,8 +29,8 @@ pub enum ProximityGraph {}
|
||||
impl RankingRuleGraphTrait for ProximityGraph {
|
||||
type Condition = ProximityCondition;
|
||||
|
||||
fn resolve_condition<'ctx>(
|
||||
ctx: &mut SearchContext<'ctx>,
|
||||
fn resolve_condition(
|
||||
ctx: &mut SearchContext,
|
||||
condition: &Self::Condition,
|
||||
universe: &RoaringBitmap,
|
||||
) -> Result<(roaring::RoaringBitmap, FxHashSet<Interned<String>>, FxHashSet<Interned<Phrase>>)>
|
||||
@ -38,8 +38,8 @@ impl RankingRuleGraphTrait for ProximityGraph {
|
||||
compute_docids::compute_docids(ctx, condition, universe)
|
||||
}
|
||||
|
||||
fn build_edges<'ctx>(
|
||||
ctx: &mut SearchContext<'ctx>,
|
||||
fn build_edges(
|
||||
ctx: &mut SearchContext,
|
||||
conditions_interner: &mut DedupInterner<Self::Condition>,
|
||||
source_node: &QueryNode,
|
||||
dest_node: &QueryNode,
|
||||
@ -59,10 +59,7 @@ impl RankingRuleGraphTrait for ProximityGraph {
|
||||
logger.log_proximity_state(graph, paths, dead_ends_cache, universe, distances, cost);
|
||||
}
|
||||
|
||||
fn label_for_condition<'ctx>(
|
||||
ctx: &mut SearchContext<'ctx>,
|
||||
condition: &Self::Condition,
|
||||
) -> Result<String> {
|
||||
fn label_for_condition(ctx: &mut SearchContext, condition: &Self::Condition) -> Result<String> {
|
||||
match condition {
|
||||
ProximityCondition::Uninit { cost, .. } => {
|
||||
// TODO
|
||||
|
@ -23,8 +23,8 @@ pub enum TypoGraph {}
|
||||
impl RankingRuleGraphTrait for TypoGraph {
|
||||
type Condition = TypoCondition;
|
||||
|
||||
fn resolve_condition<'db_cache, 'ctx>(
|
||||
ctx: &mut SearchContext<'ctx>,
|
||||
fn resolve_condition<'db_cache>(
|
||||
ctx: &mut SearchContext,
|
||||
condition: &Self::Condition,
|
||||
universe: &RoaringBitmap,
|
||||
) -> Result<(RoaringBitmap, FxHashSet<Interned<String>>, FxHashSet<Interned<Phrase>>)> {
|
||||
@ -57,8 +57,8 @@ impl RankingRuleGraphTrait for TypoGraph {
|
||||
))
|
||||
}
|
||||
|
||||
fn build_edges<'ctx>(
|
||||
ctx: &mut SearchContext<'ctx>,
|
||||
fn build_edges(
|
||||
ctx: &mut SearchContext,
|
||||
conditions_interner: &mut DedupInterner<Self::Condition>,
|
||||
_from_node: &QueryNode,
|
||||
to_node: &QueryNode,
|
||||
@ -152,10 +152,7 @@ impl RankingRuleGraphTrait for TypoGraph {
|
||||
logger.log_typo_state(graph, paths, dead_ends_cache, universe, distances, cost);
|
||||
}
|
||||
|
||||
fn label_for_condition<'ctx>(
|
||||
ctx: &mut SearchContext<'ctx>,
|
||||
condition: &Self::Condition,
|
||||
) -> Result<String> {
|
||||
fn label_for_condition(ctx: &mut SearchContext, condition: &Self::Condition) -> Result<String> {
|
||||
let TypoCondition { term } = condition;
|
||||
let term = ctx.term_interner.get(*term);
|
||||
let QueryTerm {
|
||||
|
Reference in New Issue
Block a user