Fix PR comments

Co-authored-by: Clément Renault <clement@meilisearch.com>
This commit is contained in:
Many 2021-04-26 11:30:42 +02:00 committed by many
parent 0d7d3ce802
commit 0daa0e170a
No known key found for this signature in database
GPG Key ID: 2CEF23B75189EACA
4 changed files with 12 additions and 9 deletions

View File

@ -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";

View File

@ -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> {

View File

@ -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),
} }

View File

@ -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());