mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-10-30 01:38:49 +01:00
Fix all errors around the cache
This commit is contained in:
parent
27fc50c476
commit
287b1c51db
@ -275,9 +275,9 @@ impl DocidsExtractor for FacetedDocidsExtractor {
|
||||
|
||||
let readers: Vec<_> = datastore
|
||||
.into_iter()
|
||||
.par_bridge()
|
||||
// .par_bridge() // T is !Send
|
||||
.map(|cached_sorter| {
|
||||
let cached_sorter = cached_sorter.0.into_inner();
|
||||
let cached_sorter = cached_sorter.into_inner();
|
||||
let sorter = cached_sorter.into_sorter()?;
|
||||
sorter.into_reader_cursors()
|
||||
})
|
||||
|
@ -253,33 +253,16 @@ impl WordDocidsMergerBuilders {
|
||||
current_docid: _,
|
||||
} = other;
|
||||
|
||||
let mut word_fid_docids_readers = Ok(vec![]);
|
||||
let mut word_docids_readers = Ok(vec![]);
|
||||
let mut exact_word_docids_readers = Ok(vec![]);
|
||||
let mut word_position_docids_readers = Ok(vec![]);
|
||||
let mut fid_word_count_docids_readers = Ok(vec![]);
|
||||
rayon::scope(|s| {
|
||||
s.spawn(|_| {
|
||||
word_fid_docids_readers =
|
||||
let word_fid_docids_readers =
|
||||
word_fid_docids.into_sorter().and_then(|s| s.into_reader_cursors());
|
||||
});
|
||||
s.spawn(|_| {
|
||||
word_docids_readers =
|
||||
word_docids.into_sorter().and_then(|s| s.into_reader_cursors());
|
||||
});
|
||||
s.spawn(|_| {
|
||||
exact_word_docids_readers =
|
||||
let word_docids_readers = word_docids.into_sorter().and_then(|s| s.into_reader_cursors());
|
||||
let exact_word_docids_readers =
|
||||
exact_word_docids.into_sorter().and_then(|s| s.into_reader_cursors());
|
||||
});
|
||||
s.spawn(|_| {
|
||||
word_position_docids_readers =
|
||||
let word_position_docids_readers =
|
||||
word_position_docids.into_sorter().and_then(|s| s.into_reader_cursors());
|
||||
});
|
||||
s.spawn(|_| {
|
||||
fid_word_count_docids_readers =
|
||||
let fid_word_count_docids_readers =
|
||||
fid_word_count_docids.into_sorter().and_then(|s| s.into_reader_cursors());
|
||||
});
|
||||
});
|
||||
|
||||
self.word_fid_docids.extend(word_fid_docids_readers?);
|
||||
self.word_docids.extend(word_docids_readers?);
|
||||
self.exact_word_docids.extend(exact_word_docids_readers?);
|
||||
@ -455,7 +438,7 @@ impl WordDocidsExtractors {
|
||||
let index = &context.index;
|
||||
let rtxn = &context.txn;
|
||||
let mut cached_sorter_ref = context.data.borrow_mut_or_yield();
|
||||
let cached_sorter = cached_sorter.as_mut().unwrap();
|
||||
let cached_sorter = cached_sorter_ref.as_mut().unwrap();
|
||||
let mut new_fields_ids_map = context.new_fields_ids_map.borrow_mut_or_yield();
|
||||
let new_fields_ids_map = new_fields_ids_map.deref_mut();
|
||||
|
||||
|
@ -127,12 +127,9 @@ pub trait SearchableExtractor: Sized + Sync {
|
||||
|
||||
let readers: Vec<_> = datastore
|
||||
.into_iter()
|
||||
.par_bridge()
|
||||
.map(|cache_entry| {
|
||||
let cached_sorter: FullySend<
|
||||
RefCell<CboCachedSorter<MergeDeladdCboRoaringBitmaps>>,
|
||||
> = cache_entry;
|
||||
let cached_sorter = cached_sorter.0.into_inner();
|
||||
// .par_bridge() // T is !Send
|
||||
.map(|cache_sorter| {
|
||||
let cached_sorter = cache_sorter.into_inner();
|
||||
let sorter = cached_sorter.into_sorter()?;
|
||||
sorter.into_reader_cursors()
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user