diff --git a/milli/src/update/new/extract/faceted/extract_facets.rs b/milli/src/update/new/extract/faceted/extract_facets.rs index 76e358ac7..8da451341 100644 --- a/milli/src/update/new/extract/faceted/extract_facets.rs +++ b/milli/src/update/new/extract/faceted/extract_facets.rs @@ -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() }) diff --git a/milli/src/update/new/extract/searchable/extract_word_docids.rs b/milli/src/update/new/extract/searchable/extract_word_docids.rs index 9b7347f25..ca73a0922 100644 --- a/milli/src/update/new/extract/searchable/extract_word_docids.rs +++ b/milli/src/update/new/extract/searchable/extract_word_docids.rs @@ -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 = - 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 = - exact_word_docids.into_sorter().and_then(|s| s.into_reader_cursors()); - }); - s.spawn(|_| { - word_position_docids_readers = - word_position_docids.into_sorter().and_then(|s| s.into_reader_cursors()); - }); - s.spawn(|_| { - fid_word_count_docids_readers = - fid_word_count_docids.into_sorter().and_then(|s| s.into_reader_cursors()); - }); - }); + let word_fid_docids_readers = + word_fid_docids.into_sorter().and_then(|s| s.into_reader_cursors()); + 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()); + let word_position_docids_readers = + word_position_docids.into_sorter().and_then(|s| s.into_reader_cursors()); + 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(); diff --git a/milli/src/update/new/extract/searchable/mod.rs b/milli/src/update/new/extract/searchable/mod.rs index 29fda386b..0a4fd6dd1 100644 --- a/milli/src/update/new/extract/searchable/mod.rs +++ b/milli/src/update/new/extract/searchable/mod.rs @@ -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>, - > = 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() })