mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-30 10:20:05 +00:00
Update call sites
This commit is contained in:
committed by
Loïc Lecrenier
parent
244003e36f
commit
e7ff987c46
@ -1,11 +1,10 @@
|
||||
use heed::BytesDecode;
|
||||
use roaring::{MultiOps, RoaringBitmap};
|
||||
|
||||
use super::query_graph::QueryGraph;
|
||||
use super::ranking_rules::{RankingRule, RankingRuleOutput};
|
||||
use crate::search::new::query_graph::QueryNodeData;
|
||||
use crate::search::new::query_term::ExactTerm;
|
||||
use crate::{CboRoaringBitmapCodec, Result, SearchContext, SearchLogger};
|
||||
use crate::{Result, SearchContext, SearchLogger};
|
||||
|
||||
/// A ranking rule that produces 3 disjoint buckets:
|
||||
///
|
||||
@ -161,10 +160,8 @@ impl State {
|
||||
// Note: Since the position is stored bucketed in word_position_docids, for queries with a lot of
|
||||
// longer phrases we'll be losing on precision here.
|
||||
let bucketed_position = crate::bucketed_position(position + offset);
|
||||
let word_position_docids = CboRoaringBitmapCodec::bytes_decode(
|
||||
ctx.get_db_word_position_docids(*word, bucketed_position)?.unwrap_or_default(),
|
||||
)
|
||||
.unwrap_or_default();
|
||||
let word_position_docids =
|
||||
ctx.get_db_word_position_docids(*word, bucketed_position)?.unwrap_or_default();
|
||||
candidates &= word_position_docids;
|
||||
if candidates.is_empty() {
|
||||
return Ok(State::Empty(query_graph.clone()));
|
||||
@ -191,11 +188,7 @@ impl State {
|
||||
// ignore stop words words in phrases
|
||||
.flatten()
|
||||
.map(|word| -> Result<_> {
|
||||
Ok(ctx
|
||||
.get_db_word_fid_docids(*word, fid)?
|
||||
.map(CboRoaringBitmapCodec::bytes_decode)
|
||||
.unwrap_or_default()
|
||||
.unwrap_or_default())
|
||||
Ok(ctx.get_db_word_fid_docids(*word, fid)?.unwrap_or_default())
|
||||
}),
|
||||
)?;
|
||||
intersection &= &candidates;
|
||||
|
Reference in New Issue
Block a user