Fxi the into_changes stop processing

This commit is contained in:
Clément Renault 2024-11-20 14:58:25 +01:00
parent 84600a10d1
commit 567bd4538b
No known key found for this signature in database
GPG Key ID: F250A4C4E3AE5F5F
10 changed files with 365 additions and 55 deletions

View File

@ -143,7 +143,14 @@ fn indexing_songs_default(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -201,7 +208,14 @@ fn reindexing_songs_default(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -237,7 +251,14 @@ fn reindexing_songs_default(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -297,7 +318,14 @@ fn deleting_songs_in_batches_default(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -365,7 +393,14 @@ fn indexing_songs_in_three_batches_default(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -401,7 +436,14 @@ fn indexing_songs_in_three_batches_default(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -433,7 +475,14 @@ fn indexing_songs_in_three_batches_default(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -492,7 +541,14 @@ fn indexing_songs_without_faceted_numbers(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -550,7 +606,14 @@ fn indexing_songs_without_faceted_fields(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -608,7 +671,14 @@ fn indexing_wiki(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -665,7 +735,14 @@ fn reindexing_wiki(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -701,7 +778,14 @@ fn reindexing_wiki(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -760,7 +844,14 @@ fn deleting_wiki_in_batches_default(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -828,7 +919,14 @@ fn indexing_wiki_in_three_batches(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -865,7 +963,14 @@ fn indexing_wiki_in_three_batches(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -898,7 +1003,14 @@ fn indexing_wiki_in_three_batches(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -956,7 +1068,14 @@ fn indexing_movies_default(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -1013,7 +1132,14 @@ fn reindexing_movies_default(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -1049,7 +1175,14 @@ fn reindexing_movies_default(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -1108,7 +1241,14 @@ fn deleting_movies_in_batches_default(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -1211,7 +1351,14 @@ fn indexing_movies_in_three_batches(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -1247,7 +1394,14 @@ fn indexing_movies_in_three_batches(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -1279,7 +1433,14 @@ fn indexing_movies_in_three_batches(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -1360,7 +1521,14 @@ fn indexing_nested_movies_default(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -1442,7 +1610,14 @@ fn deleting_nested_movies_in_batches_default(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -1516,7 +1691,14 @@ fn indexing_nested_movies_without_faceted_fields(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -1574,7 +1756,14 @@ fn indexing_geo(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -1631,7 +1820,14 @@ fn reindexing_geo(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -1667,7 +1863,14 @@ fn reindexing_geo(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -1726,7 +1929,14 @@ fn deleting_geo_in_batches_default(c: &mut Criterion) {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(

View File

@ -102,8 +102,9 @@ pub fn base_setup(conf: &Conf) -> Index {
indexer.add_documents(&documents).unwrap(); indexer.add_documents(&documents).unwrap();
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = let (document_changes, _operation_stats, primary_key) = indexer
indexer.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map).unwrap(); .into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map, &|| false)
.unwrap();
indexer::index( indexer::index(
&mut wtxn, &mut wtxn,

View File

@ -127,6 +127,7 @@ fn main() {
&rtxn, &rtxn,
None, None,
&mut new_fields_ids_map, &mut new_fields_ids_map,
&|| false,
) )
.unwrap(); .unwrap();

View File

@ -1763,6 +1763,7 @@ pub(crate) mod tests {
&rtxn, &rtxn,
None, None,
&mut new_fields_ids_map, &mut new_fields_ids_map,
&|| false,
)?; )?;
if let Some(error) = operation_stats.into_iter().find_map(|stat| stat.error) { if let Some(error) = operation_stats.into_iter().find_map(|stat| stat.error) {
@ -1851,6 +1852,7 @@ pub(crate) mod tests {
&rtxn, &rtxn,
None, None,
&mut new_fields_ids_map, &mut new_fields_ids_map,
&|| false,
)?; )?;
if let Some(error) = operation_stats.into_iter().find_map(|stat| stat.error) { if let Some(error) = operation_stats.into_iter().find_map(|stat| stat.error) {
@ -1923,7 +1925,14 @@ pub(crate) mod tests {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index.inner, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index.inner,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
should_abort.store(true, Relaxed); should_abort.store(true, Relaxed);

View File

@ -64,8 +64,9 @@ pub fn setup_search_index_with_criteria(criteria: &[Criterion]) -> Index {
indexer.add_documents(&payload).unwrap(); indexer.add_documents(&payload).unwrap();
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, operation_stats, primary_key) = let (document_changes, operation_stats, primary_key) = indexer
indexer.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map).unwrap(); .into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map, &|| false)
.unwrap();
if let Some(error) = operation_stats.into_iter().find_map(|stat| stat.error) { if let Some(error) = operation_stats.into_iter().find_map(|stat| stat.error) {
panic!("{error}"); panic!("{error}");

View File

@ -1940,7 +1940,14 @@ mod tests {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (_document_changes, operation_stats, _primary_key) = indexer let (_document_changes, operation_stats, _primary_key) = indexer
.into_changes(&indexer_alloc, &index.inner, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index.inner,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
assert_eq!(operation_stats.iter().filter(|ps| ps.error.is_none()).count(), 1); assert_eq!(operation_stats.iter().filter(|ps| ps.error.is_none()).count(), 1);
@ -2116,7 +2123,14 @@ mod tests {
indexer.add_documents(&documents).unwrap(); indexer.add_documents(&documents).unwrap();
indexer.delete_documents(&["2"]); indexer.delete_documents(&["2"]);
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index.inner, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index.inner,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -2169,7 +2183,14 @@ mod tests {
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let embedders = EmbeddingConfigs::default(); let embedders = EmbeddingConfigs::default();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index.inner, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index.inner,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -2213,7 +2234,14 @@ mod tests {
indexer.add_documents(&documents).unwrap(); indexer.add_documents(&documents).unwrap();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index.inner, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index.inner,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -2256,7 +2284,14 @@ mod tests {
indexer.delete_documents(&["1", "2"]); indexer.delete_documents(&["1", "2"]);
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index.inner, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index.inner,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -2301,7 +2336,14 @@ mod tests {
indexer.add_documents(&documents).unwrap(); indexer.add_documents(&documents).unwrap();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index.inner, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index.inner,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -2351,7 +2393,14 @@ mod tests {
indexer.delete_documents(&["1", "2", "1", "2"]); indexer.delete_documents(&["1", "2", "1", "2"]);
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index.inner, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index.inner,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -2394,7 +2443,14 @@ mod tests {
indexer.add_documents(&documents).unwrap(); indexer.add_documents(&documents).unwrap();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index.inner, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index.inner,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -2437,7 +2493,14 @@ mod tests {
indexer.add_documents(&documents).unwrap(); indexer.add_documents(&documents).unwrap();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index.inner, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index.inner,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -2622,7 +2685,14 @@ mod tests {
// FINISHING // FINISHING
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index.inner, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index.inner,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -2672,7 +2742,14 @@ mod tests {
indexer.add_documents(&documents).unwrap(); indexer.add_documents(&documents).unwrap();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index.inner, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index.inner,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(
@ -2719,7 +2796,14 @@ mod tests {
indexer.add_documents(&documents).unwrap(); indexer.add_documents(&documents).unwrap();
let (document_changes, _operation_stats, primary_key) = indexer let (document_changes, _operation_stats, primary_key) = indexer
.into_changes(&indexer_alloc, &index.inner, &rtxn, None, &mut new_fields_ids_map) .into_changes(
&indexer_alloc,
&index.inner,
&rtxn,
None,
&mut new_fields_ids_map,
&|| false,
)
.unwrap(); .unwrap();
indexer::index( indexer::index(

View File

@ -49,8 +49,9 @@ fn test_facet_distribution_with_no_facet_values() {
indexer.add_documents(&documents).unwrap(); indexer.add_documents(&documents).unwrap();
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = let (document_changes, _operation_stats, primary_key) = indexer
indexer.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map).unwrap(); .into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map, &|| false)
.unwrap();
indexer::index( indexer::index(
&mut wtxn, &mut wtxn,

View File

@ -82,8 +82,9 @@ pub fn setup_search_index_with_criteria(criteria: &[Criterion]) -> Index {
indexer.add_documents(&payload).unwrap(); indexer.add_documents(&payload).unwrap();
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, operation_stats, primary_key) = let (document_changes, operation_stats, primary_key) = indexer
indexer.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map).unwrap(); .into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map, &|| false)
.unwrap();
if let Some(error) = operation_stats.into_iter().find_map(|stat| stat.error) { if let Some(error) = operation_stats.into_iter().find_map(|stat| stat.error) {
panic!("{error}"); panic!("{error}");

View File

@ -318,8 +318,9 @@ fn criteria_ascdesc() {
let payload = unsafe { memmap2::Mmap::map(&file).unwrap() }; let payload = unsafe { memmap2::Mmap::map(&file).unwrap() };
indexer.add_documents(&payload).unwrap(); indexer.add_documents(&payload).unwrap();
let (document_changes, _operation_stats, primary_key) = let (document_changes, _operation_stats, primary_key) = indexer
indexer.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map).unwrap(); .into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map, &|| false)
.unwrap();
indexer::index( indexer::index(
&mut wtxn, &mut wtxn,

View File

@ -127,8 +127,9 @@ fn test_typo_disabled_on_word() {
indexer.add_documents(&documents).unwrap(); indexer.add_documents(&documents).unwrap();
let indexer_alloc = Bump::new(); let indexer_alloc = Bump::new();
let (document_changes, _operation_stats, primary_key) = let (document_changes, _operation_stats, primary_key) = indexer
indexer.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map).unwrap(); .into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map, &|| false)
.unwrap();
indexer::index( indexer::index(
&mut wtxn, &mut wtxn,