mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 10:37:41 +08:00
Remove some warnings
This commit is contained in:
parent
073f89db79
commit
01d5eedf2f
@ -1,16 +1,12 @@
|
|||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::convert::TryInto;
|
use std::convert::TryInto;
|
||||||
use std::{fmt, str};
|
use std::fmt;
|
||||||
|
|
||||||
use fst::map::IndexedValue;
|
use fst::Streamer;
|
||||||
use fst::{IntoStreamer, Streamer};
|
|
||||||
use roaring::RoaringBitmap;
|
|
||||||
|
|
||||||
use crate::DocumentId;
|
use crate::DocumentId;
|
||||||
|
|
||||||
const DELETED_ID: u64 = u64::MAX;
|
|
||||||
|
|
||||||
pub enum DocumentOperationKind {
|
pub enum DocumentOperationKind {
|
||||||
Create,
|
Create,
|
||||||
Delete,
|
Delete,
|
||||||
@ -133,8 +129,3 @@ impl Default for ExternalDocumentsIds<'static> {
|
|||||||
ExternalDocumentsIds(fst::Map::default().map_data(Cow::Owned).unwrap())
|
ExternalDocumentsIds(fst::Map::default().map_data(Cow::Owned).unwrap())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the value of the `IndexedValue` with the highest _index_.
|
|
||||||
fn indexed_last_value(indexed_values: &[IndexedValue]) -> Option<u64> {
|
|
||||||
indexed_values.iter().copied().max_by_key(|iv| iv.index).map(|iv| iv.value)
|
|
||||||
}
|
|
||||||
|
@ -377,11 +377,6 @@ where
|
|||||||
let index_documents_ids = self.index.documents_ids(self.wtxn)?;
|
let index_documents_ids = self.index.documents_ids(self.wtxn)?;
|
||||||
let index_is_empty = index_documents_ids.is_empty();
|
let index_is_empty = index_documents_ids.is_empty();
|
||||||
let mut final_documents_ids = RoaringBitmap::new();
|
let mut final_documents_ids = RoaringBitmap::new();
|
||||||
let mut word_pair_proximity_docids = None;
|
|
||||||
let mut word_position_docids = None;
|
|
||||||
let mut word_fid_docids = None;
|
|
||||||
let mut word_docids = None;
|
|
||||||
let mut exact_word_docids = None;
|
|
||||||
|
|
||||||
let mut databases_seen = 0;
|
let mut databases_seen = 0;
|
||||||
(self.progress)(UpdateIndexingStep::MergeDataIntoFinalDatabase {
|
(self.progress)(UpdateIndexingStep::MergeDataIntoFinalDatabase {
|
||||||
@ -399,30 +394,15 @@ where
|
|||||||
word_docids_reader,
|
word_docids_reader,
|
||||||
exact_word_docids_reader,
|
exact_word_docids_reader,
|
||||||
word_fid_docids_reader,
|
word_fid_docids_reader,
|
||||||
} => {
|
} => TypedChunk::WordDocids {
|
||||||
let cloneable_chunk = unsafe { as_cloneable_grenad(&word_docids_reader)? };
|
|
||||||
word_docids = Some(cloneable_chunk);
|
|
||||||
let cloneable_chunk =
|
|
||||||
unsafe { as_cloneable_grenad(&exact_word_docids_reader)? };
|
|
||||||
exact_word_docids = Some(cloneable_chunk);
|
|
||||||
let cloneable_chunk = unsafe { as_cloneable_grenad(&word_fid_docids_reader)? };
|
|
||||||
word_fid_docids = Some(cloneable_chunk);
|
|
||||||
TypedChunk::WordDocids {
|
|
||||||
word_docids_reader,
|
word_docids_reader,
|
||||||
exact_word_docids_reader,
|
exact_word_docids_reader,
|
||||||
word_fid_docids_reader,
|
word_fid_docids_reader,
|
||||||
}
|
},
|
||||||
}
|
|
||||||
TypedChunk::WordPairProximityDocids(chunk) => {
|
TypedChunk::WordPairProximityDocids(chunk) => {
|
||||||
let cloneable_chunk = unsafe { as_cloneable_grenad(&chunk)? };
|
|
||||||
word_pair_proximity_docids = Some(cloneable_chunk);
|
|
||||||
TypedChunk::WordPairProximityDocids(chunk)
|
TypedChunk::WordPairProximityDocids(chunk)
|
||||||
}
|
}
|
||||||
TypedChunk::WordPositionDocids(chunk) => {
|
TypedChunk::WordPositionDocids(chunk) => TypedChunk::WordPositionDocids(chunk),
|
||||||
let cloneable_chunk = unsafe { as_cloneable_grenad(&chunk)? };
|
|
||||||
word_position_docids = Some(cloneable_chunk);
|
|
||||||
TypedChunk::WordPositionDocids(chunk)
|
|
||||||
}
|
|
||||||
otherwise => otherwise,
|
otherwise => otherwise,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user