mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-30 09:04:59 +08:00
remove field_id_from_position
This commit is contained in:
parent
dac81b2d44
commit
b85cd4983e
@ -74,10 +74,6 @@ pub fn absolute_from_relative_position(field_id: FieldId, relative: RelativePosi
|
||||
(field_id as u32) << 16 | (relative as u32)
|
||||
}
|
||||
|
||||
pub fn field_id_from_position(position: u32) -> FieldId {
|
||||
(position >> 16 & 0xffff) as u16
|
||||
}
|
||||
|
||||
/// Transform a raw obkv store into a JSON Object.
|
||||
pub fn obkv_to_json(
|
||||
displayed_fields: &[FieldId],
|
||||
|
@ -12,7 +12,7 @@ use super::helpers::{
|
||||
use crate::error::SerializationError;
|
||||
use crate::index::db_name::DOCID_WORD_POSITIONS;
|
||||
use crate::update::index_documents::helpers::read_u32_ne_bytes;
|
||||
use crate::{field_id_from_position, FieldId, Result};
|
||||
use crate::{relative_from_absolute_position, FieldId, Result};
|
||||
|
||||
/// Extracts the word and the documents ids where this word appear.
|
||||
///
|
||||
@ -67,7 +67,7 @@ pub fn extract_word_docids<R: io::Read + io::Seek>(
|
||||
if added_to_exact && added_to_word_docids {
|
||||
break;
|
||||
}
|
||||
let fid = field_id_from_position(position);
|
||||
let (fid, _) = relative_from_absolute_position(position);
|
||||
if exact_attributes.contains(&fid) && !added_to_exact {
|
||||
exact_word_docids_sorter.insert(word_bytes, &value_buffer)?;
|
||||
added_to_exact = true;
|
||||
|
Loading…
Reference in New Issue
Block a user