mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-30 09:04:59 +08:00
Fix PR comments
Co-authored-by: Clément Renault <clement@meilisearch.com>
This commit is contained in:
parent
0d7d3ce802
commit
0daa0e170a
@ -354,8 +354,7 @@ fn biggest_value_sizes(index: &Index, rtxn: &heed::RoTxn, limit: usize) -> anyho
|
|||||||
word_prefix_level_position_docids,
|
word_prefix_level_position_docids,
|
||||||
facet_field_id_value_docids,
|
facet_field_id_value_docids,
|
||||||
field_id_docid_facet_values: _,
|
field_id_docid_facet_values: _,
|
||||||
documents,
|
documents
|
||||||
..
|
|
||||||
} = index;
|
} = index;
|
||||||
|
|
||||||
let main_name = "main";
|
let main_name = "main";
|
||||||
|
@ -13,7 +13,7 @@ use super::{Criterion, CriterionResult, Context, resolve_query_tree};
|
|||||||
|
|
||||||
/// To be able to divide integers by the number of words in the query
|
/// To be able to divide integers by the number of words in the query
|
||||||
/// we want to find a multiplier that allow us to divide by any number between 1 and 10.
|
/// we want to find a multiplier that allow us to divide by any number between 1 and 10.
|
||||||
/// We Choosed the LCM of all numbers between 1 and 10 as the multiplier (https://en.wikipedia.org/wiki/Least_common_multiple).
|
/// We chose the LCM of all numbers between 1 and 10 as the multiplier (https://en.wikipedia.org/wiki/Least_common_multiple).
|
||||||
const LCM_10_FIRST_NUMBERS: u32 = 2520;
|
const LCM_10_FIRST_NUMBERS: u32 = 2520;
|
||||||
|
|
||||||
pub struct Attribute<'t> {
|
pub struct Attribute<'t> {
|
||||||
|
@ -44,11 +44,7 @@ impl<'t> Final<'t> {
|
|||||||
|
|
||||||
bucket_candidates.union_with(&candidates);
|
bucket_candidates.union_with(&candidates);
|
||||||
|
|
||||||
return Ok(Some(FinalResult {
|
return Ok(Some(FinalResult { query_tree, candidates, bucket_candidates }));
|
||||||
query_tree,
|
|
||||||
candidates,
|
|
||||||
bucket_candidates,
|
|
||||||
}));
|
|
||||||
},
|
},
|
||||||
None => return Ok(None),
|
None => return Ok(None),
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,15 @@ impl<'c> Context<'c> for CriteriaBuilder<'c> {
|
|||||||
Ok(words_positions)
|
Ok(words_positions)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn word_position_iterator(&self, word: &str, level: TreeLevel, in_prefix_cache: bool, left: Option<u32>, right: Option<u32>) -> heed::Result<Box<dyn Iterator<Item =heed::Result<((&'c str, TreeLevel, u32, u32), RoaringBitmap)>> + 'c>> {
|
fn word_position_iterator(
|
||||||
|
&self,
|
||||||
|
word: &str,
|
||||||
|
level: TreeLevel,
|
||||||
|
in_prefix_cache: bool,
|
||||||
|
left: Option<u32>,
|
||||||
|
right: Option<u32>
|
||||||
|
) -> heed::Result<Box<dyn Iterator<Item =heed::Result<((&'c str, TreeLevel, u32, u32), RoaringBitmap)>> + 'c>>
|
||||||
|
{
|
||||||
let range = {
|
let range = {
|
||||||
let left = left.unwrap_or(u32::min_value());
|
let left = left.unwrap_or(u32::min_value());
|
||||||
let right = right.unwrap_or(u32::max_value());
|
let right = right.unwrap_or(u32::max_value());
|
||||||
|
Loading…
Reference in New Issue
Block a user