mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-01-11 05:54:30 +01:00
Remove all warnings
This commit is contained in:
parent
87610a5f98
commit
1ad1fcc8c8
@ -30,7 +30,7 @@ pub fn extract_docid_word_positions<R: io::Read + io::Seek>(
|
|||||||
allowed_separators: Option<&[&str]>,
|
allowed_separators: Option<&[&str]>,
|
||||||
dictionary: Option<&[&str]>,
|
dictionary: Option<&[&str]>,
|
||||||
max_positions_per_attributes: Option<u32>,
|
max_positions_per_attributes: Option<u32>,
|
||||||
) -> Result<(RoaringBitmap, grenad::Reader<BufReader<File>>, ScriptLanguageDocidsMap)> {
|
) -> Result<(grenad::Reader<BufReader<File>>, ScriptLanguageDocidsMap)> {
|
||||||
puffin::profile_function!();
|
puffin::profile_function!();
|
||||||
|
|
||||||
let max_positions_per_attributes = max_positions_per_attributes
|
let max_positions_per_attributes = max_positions_per_attributes
|
||||||
@ -154,7 +154,7 @@ pub fn extract_docid_word_positions<R: io::Read + io::Seek>(
|
|||||||
|
|
||||||
// the returned sorter is serialized as: key: (DocId, FieldId), value: KV<DelAdd, KV<u16, String>>.
|
// the returned sorter is serialized as: key: (DocId, FieldId), value: KV<DelAdd, KV<u16, String>>.
|
||||||
sorter_into_reader(docid_word_positions_sorter, indexer)
|
sorter_into_reader(docid_word_positions_sorter, indexer)
|
||||||
.map(|reader| (documents_ids, reader, script_language_docids))
|
.map(|reader| (reader, script_language_docids))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Check if any searchable fields of a document changed.
|
/// Check if any searchable fields of a document changed.
|
||||||
|
@ -348,7 +348,7 @@ fn send_and_extract_flattened_documents_data(
|
|||||||
let (docid_word_positions_chunk, fid_docid_facet_values_chunks): (Result<_>, Result<_>) =
|
let (docid_word_positions_chunk, fid_docid_facet_values_chunks): (Result<_>, Result<_>) =
|
||||||
rayon::join(
|
rayon::join(
|
||||||
|| {
|
|| {
|
||||||
let (documents_ids, docid_word_positions_chunk, script_language_pair) =
|
let (docid_word_positions_chunk, script_language_pair) =
|
||||||
extract_docid_word_positions(
|
extract_docid_word_positions(
|
||||||
flattened_documents_chunk.clone(),
|
flattened_documents_chunk.clone(),
|
||||||
indexer,
|
indexer,
|
||||||
|
@ -245,9 +245,6 @@ where
|
|||||||
primary_key,
|
primary_key,
|
||||||
fields_ids_map,
|
fields_ids_map,
|
||||||
field_distribution,
|
field_distribution,
|
||||||
new_external_documents_ids,
|
|
||||||
new_documents_ids,
|
|
||||||
replaced_documents_ids,
|
|
||||||
documents_count,
|
documents_count,
|
||||||
original_documents,
|
original_documents,
|
||||||
flattened_documents,
|
flattened_documents,
|
||||||
|
@ -32,9 +32,6 @@ pub struct TransformOutput {
|
|||||||
pub primary_key: String,
|
pub primary_key: String,
|
||||||
pub fields_ids_map: FieldsIdsMap,
|
pub fields_ids_map: FieldsIdsMap,
|
||||||
pub field_distribution: FieldDistribution,
|
pub field_distribution: FieldDistribution,
|
||||||
pub new_external_documents_ids: fst::Map<Cow<'static, [u8]>>,
|
|
||||||
pub new_documents_ids: RoaringBitmap,
|
|
||||||
pub replaced_documents_ids: RoaringBitmap,
|
|
||||||
pub documents_count: usize,
|
pub documents_count: usize,
|
||||||
pub original_documents: File,
|
pub original_documents: File,
|
||||||
pub flattened_documents: File,
|
pub flattened_documents: File,
|
||||||
@ -735,15 +732,11 @@ impl<'a, 'i> Transform<'a, 'i> {
|
|||||||
new_external_documents_ids_builder.into_iter().try_for_each(|(key, value)| {
|
new_external_documents_ids_builder.into_iter().try_for_each(|(key, value)| {
|
||||||
fst_new_external_documents_ids_builder.insert(key, value)
|
fst_new_external_documents_ids_builder.insert(key, value)
|
||||||
})?;
|
})?;
|
||||||
let new_external_documents_ids = fst_new_external_documents_ids_builder.into_map();
|
|
||||||
|
|
||||||
Ok(TransformOutput {
|
Ok(TransformOutput {
|
||||||
primary_key,
|
primary_key,
|
||||||
fields_ids_map: self.fields_ids_map,
|
fields_ids_map: self.fields_ids_map,
|
||||||
field_distribution,
|
field_distribution,
|
||||||
new_external_documents_ids: new_external_documents_ids.map_data(Cow::Owned).unwrap(),
|
|
||||||
new_documents_ids: self.new_documents_ids,
|
|
||||||
replaced_documents_ids: self.replaced_documents_ids,
|
|
||||||
documents_count: self.documents_count,
|
documents_count: self.documents_count,
|
||||||
original_documents: original_documents.into_inner().map_err(|err| err.into_error())?,
|
original_documents: original_documents.into_inner().map_err(|err| err.into_error())?,
|
||||||
flattened_documents: flattened_documents
|
flattened_documents: flattened_documents
|
||||||
@ -889,11 +882,6 @@ impl<'a, 'i> Transform<'a, 'i> {
|
|||||||
primary_key,
|
primary_key,
|
||||||
fields_ids_map: new_fields_ids_map,
|
fields_ids_map: new_fields_ids_map,
|
||||||
field_distribution,
|
field_distribution,
|
||||||
// FIXME: remove this now unused field
|
|
||||||
new_external_documents_ids: fst::Map::default().map_data(Cow::Owned).unwrap(),
|
|
||||||
new_documents_ids: documents_ids,
|
|
||||||
// FIXME: remove this now unused field
|
|
||||||
replaced_documents_ids: RoaringBitmap::default(),
|
|
||||||
documents_count,
|
documents_count,
|
||||||
original_documents: original_documents.into_inner().into_inner(),
|
original_documents: original_documents.into_inner().into_inner(),
|
||||||
flattened_documents: flattened_documents.into_inner().into_inner(),
|
flattened_documents: flattened_documents.into_inner().into_inner(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user