mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-01-27 05:37:31 +01:00
rename the send_progress field to progress since it s not sending anything
This commit is contained in:
parent
6f4823fc97
commit
867e6a8f1d
@ -144,8 +144,7 @@ pub struct IndexingContext<
|
|||||||
pub doc_allocs: &'indexer ThreadLocal<FullySend<Cell<Bump>>>,
|
pub doc_allocs: &'indexer ThreadLocal<FullySend<Cell<Bump>>>,
|
||||||
pub fields_ids_map_store: &'indexer ThreadLocal<FullySend<RefCell<GlobalFieldsIdsMap<'fid>>>>,
|
pub fields_ids_map_store: &'indexer ThreadLocal<FullySend<RefCell<GlobalFieldsIdsMap<'fid>>>>,
|
||||||
pub must_stop_processing: &'indexer MSP,
|
pub must_stop_processing: &'indexer MSP,
|
||||||
// TODO: TAMO: Rename field to progress
|
pub progress: &'indexer Progress,
|
||||||
pub send_progress: &'indexer Progress,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<
|
impl<
|
||||||
@ -207,7 +206,7 @@ pub fn extract<
|
|||||||
doc_allocs,
|
doc_allocs,
|
||||||
fields_ids_map_store,
|
fields_ids_map_store,
|
||||||
must_stop_processing,
|
must_stop_processing,
|
||||||
send_progress,
|
progress: send_progress,
|
||||||
}: IndexingContext<'fid, 'indexer, 'index, MSP>,
|
}: IndexingContext<'fid, 'indexer, 'index, MSP>,
|
||||||
extractor_allocs: &'extractor mut ThreadLocal<FullySend<Bump>>,
|
extractor_allocs: &'extractor mut ThreadLocal<FullySend<Bump>>,
|
||||||
datastore: &'data ThreadLocal<EX::Data>,
|
datastore: &'data ThreadLocal<EX::Data>,
|
||||||
|
@ -165,7 +165,7 @@ mod test {
|
|||||||
doc_allocs: &doc_allocs,
|
doc_allocs: &doc_allocs,
|
||||||
fields_ids_map_store: &fields_ids_map_store,
|
fields_ids_map_store: &fields_ids_map_store,
|
||||||
must_stop_processing: &(|| false),
|
must_stop_processing: &(|| false),
|
||||||
send_progress: &Progress::default(),
|
progress: &Progress::default(),
|
||||||
};
|
};
|
||||||
|
|
||||||
for _ in 0..3 {
|
for _ in 0..3 {
|
||||||
|
@ -125,7 +125,7 @@ where
|
|||||||
doc_allocs: &doc_allocs,
|
doc_allocs: &doc_allocs,
|
||||||
fields_ids_map_store: &fields_ids_map_store,
|
fields_ids_map_store: &fields_ids_map_store,
|
||||||
must_stop_processing,
|
must_stop_processing,
|
||||||
send_progress,
|
progress: send_progress,
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut index_embeddings = index.embedding_configs(wtxn)?;
|
let mut index_embeddings = index.embedding_configs(wtxn)?;
|
||||||
@ -383,7 +383,7 @@ where
|
|||||||
&indexing_context.must_stop_processing,
|
&indexing_context.must_stop_processing,
|
||||||
)?;
|
)?;
|
||||||
}
|
}
|
||||||
indexing_context.send_progress.update_progress(IndexingStep::WritingToDatabase);
|
indexing_context.progress.update_progress(IndexingStep::WritingToDatabase);
|
||||||
finished_extraction.store(true, std::sync::atomic::Ordering::Relaxed);
|
finished_extraction.store(true, std::sync::atomic::Ordering::Relaxed);
|
||||||
|
|
||||||
Result::Ok((facet_field_ids_delta, index_embeddings))
|
Result::Ok((facet_field_ids_delta, index_embeddings))
|
||||||
@ -483,7 +483,7 @@ where
|
|||||||
)?;
|
)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
indexing_context.send_progress.update_progress(IndexingStep::WaitingForExtractors);
|
indexing_context.progress.update_progress(IndexingStep::WaitingForExtractors);
|
||||||
|
|
||||||
let (facet_field_ids_delta, index_embeddings) = extractor_handle.join().unwrap()?;
|
let (facet_field_ids_delta, index_embeddings) = extractor_handle.join().unwrap()?;
|
||||||
|
|
||||||
@ -496,9 +496,7 @@ where
|
|||||||
break 'vectors;
|
break 'vectors;
|
||||||
}
|
}
|
||||||
|
|
||||||
indexing_context
|
indexing_context.progress.update_progress(IndexingStep::WritingEmbeddingsToDatabase);
|
||||||
.send_progress
|
|
||||||
.update_progress(IndexingStep::WritingEmbeddingsToDatabase);
|
|
||||||
let mut rng = rand::rngs::StdRng::seed_from_u64(42);
|
let mut rng = rand::rngs::StdRng::seed_from_u64(42);
|
||||||
for (_index, (_embedder_name, _embedder, writer, dimensions)) in &mut arroy_writers {
|
for (_index, (_embedder_name, _embedder, writer, dimensions)) in &mut arroy_writers {
|
||||||
let dimensions = *dimensions;
|
let dimensions = *dimensions;
|
||||||
@ -514,19 +512,19 @@ where
|
|||||||
index.put_embedding_configs(wtxn, index_embeddings)?;
|
index.put_embedding_configs(wtxn, index_embeddings)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
indexing_context.send_progress.update_progress(IndexingStep::PostProcessingFacets);
|
indexing_context.progress.update_progress(IndexingStep::PostProcessingFacets);
|
||||||
if index.facet_search(wtxn)? {
|
if index.facet_search(wtxn)? {
|
||||||
compute_facet_search_database(index, wtxn, global_fields_ids_map)?;
|
compute_facet_search_database(index, wtxn, global_fields_ids_map)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
compute_facet_level_database(index, wtxn, facet_field_ids_delta)?;
|
compute_facet_level_database(index, wtxn, facet_field_ids_delta)?;
|
||||||
|
|
||||||
indexing_context.send_progress.update_progress(IndexingStep::PostProcessingWords);
|
indexing_context.progress.update_progress(IndexingStep::PostProcessingWords);
|
||||||
if let Some(prefix_delta) = compute_word_fst(index, wtxn)? {
|
if let Some(prefix_delta) = compute_word_fst(index, wtxn)? {
|
||||||
compute_prefix_database(index, wtxn, prefix_delta, grenad_parameters)?;
|
compute_prefix_database(index, wtxn, prefix_delta, grenad_parameters)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
indexing_context.send_progress.update_progress(IndexingStep::Finalizing);
|
indexing_context.progress.update_progress(IndexingStep::Finalizing);
|
||||||
|
|
||||||
Ok(()) as Result<_>
|
Ok(()) as Result<_>
|
||||||
})?;
|
})?;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user