mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-11-04 01:46:28 +00:00 
			
		
		
		
	Fxi the into_changes stop processing
This commit is contained in:
		@@ -1763,6 +1763,7 @@ pub(crate) mod tests {
 | 
			
		||||
                &rtxn,
 | 
			
		||||
                None,
 | 
			
		||||
                &mut new_fields_ids_map,
 | 
			
		||||
                &|| false,
 | 
			
		||||
            )?;
 | 
			
		||||
 | 
			
		||||
            if let Some(error) = operation_stats.into_iter().find_map(|stat| stat.error) {
 | 
			
		||||
@@ -1851,6 +1852,7 @@ pub(crate) mod tests {
 | 
			
		||||
                &rtxn,
 | 
			
		||||
                None,
 | 
			
		||||
                &mut new_fields_ids_map,
 | 
			
		||||
                &|| false,
 | 
			
		||||
            )?;
 | 
			
		||||
 | 
			
		||||
            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 (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();
 | 
			
		||||
 | 
			
		||||
        should_abort.store(true, Relaxed);
 | 
			
		||||
 
 | 
			
		||||
@@ -64,8 +64,9 @@ pub fn setup_search_index_with_criteria(criteria: &[Criterion]) -> Index {
 | 
			
		||||
    indexer.add_documents(&payload).unwrap();
 | 
			
		||||
 | 
			
		||||
    let indexer_alloc = Bump::new();
 | 
			
		||||
    let (document_changes, operation_stats, primary_key) =
 | 
			
		||||
        indexer.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map).unwrap();
 | 
			
		||||
    let (document_changes, operation_stats, primary_key) = indexer
 | 
			
		||||
        .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) {
 | 
			
		||||
        panic!("{error}");
 | 
			
		||||
 
 | 
			
		||||
@@ -1940,7 +1940,14 @@ mod tests {
 | 
			
		||||
 | 
			
		||||
        let indexer_alloc = Bump::new();
 | 
			
		||||
        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();
 | 
			
		||||
 | 
			
		||||
        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.delete_documents(&["2"]);
 | 
			
		||||
        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();
 | 
			
		||||
 | 
			
		||||
        indexer::index(
 | 
			
		||||
@@ -2169,7 +2183,14 @@ mod tests {
 | 
			
		||||
        let indexer_alloc = Bump::new();
 | 
			
		||||
        let embedders = EmbeddingConfigs::default();
 | 
			
		||||
        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();
 | 
			
		||||
 | 
			
		||||
        indexer::index(
 | 
			
		||||
@@ -2213,7 +2234,14 @@ mod tests {
 | 
			
		||||
        indexer.add_documents(&documents).unwrap();
 | 
			
		||||
 | 
			
		||||
        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();
 | 
			
		||||
 | 
			
		||||
        indexer::index(
 | 
			
		||||
@@ -2256,7 +2284,14 @@ mod tests {
 | 
			
		||||
        indexer.delete_documents(&["1", "2"]);
 | 
			
		||||
 | 
			
		||||
        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();
 | 
			
		||||
 | 
			
		||||
        indexer::index(
 | 
			
		||||
@@ -2301,7 +2336,14 @@ mod tests {
 | 
			
		||||
        indexer.add_documents(&documents).unwrap();
 | 
			
		||||
 | 
			
		||||
        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();
 | 
			
		||||
 | 
			
		||||
        indexer::index(
 | 
			
		||||
@@ -2351,7 +2393,14 @@ mod tests {
 | 
			
		||||
        indexer.delete_documents(&["1", "2", "1", "2"]);
 | 
			
		||||
 | 
			
		||||
        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();
 | 
			
		||||
 | 
			
		||||
        indexer::index(
 | 
			
		||||
@@ -2394,7 +2443,14 @@ mod tests {
 | 
			
		||||
        indexer.add_documents(&documents).unwrap();
 | 
			
		||||
 | 
			
		||||
        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();
 | 
			
		||||
 | 
			
		||||
        indexer::index(
 | 
			
		||||
@@ -2437,7 +2493,14 @@ mod tests {
 | 
			
		||||
        indexer.add_documents(&documents).unwrap();
 | 
			
		||||
 | 
			
		||||
        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();
 | 
			
		||||
 | 
			
		||||
        indexer::index(
 | 
			
		||||
@@ -2622,7 +2685,14 @@ mod tests {
 | 
			
		||||
 | 
			
		||||
        // FINISHING
 | 
			
		||||
        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();
 | 
			
		||||
 | 
			
		||||
        indexer::index(
 | 
			
		||||
@@ -2672,7 +2742,14 @@ mod tests {
 | 
			
		||||
        indexer.add_documents(&documents).unwrap();
 | 
			
		||||
 | 
			
		||||
        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();
 | 
			
		||||
 | 
			
		||||
        indexer::index(
 | 
			
		||||
@@ -2719,7 +2796,14 @@ mod tests {
 | 
			
		||||
        indexer.add_documents(&documents).unwrap();
 | 
			
		||||
 | 
			
		||||
        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();
 | 
			
		||||
 | 
			
		||||
        indexer::index(
 | 
			
		||||
 
 | 
			
		||||
@@ -49,8 +49,9 @@ fn test_facet_distribution_with_no_facet_values() {
 | 
			
		||||
    indexer.add_documents(&documents).unwrap();
 | 
			
		||||
 | 
			
		||||
    let indexer_alloc = Bump::new();
 | 
			
		||||
    let (document_changes, _operation_stats, primary_key) =
 | 
			
		||||
        indexer.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map).unwrap();
 | 
			
		||||
    let (document_changes, _operation_stats, primary_key) = indexer
 | 
			
		||||
        .into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map, &|| false)
 | 
			
		||||
        .unwrap();
 | 
			
		||||
 | 
			
		||||
    indexer::index(
 | 
			
		||||
        &mut wtxn,
 | 
			
		||||
 
 | 
			
		||||
@@ -82,8 +82,9 @@ pub fn setup_search_index_with_criteria(criteria: &[Criterion]) -> Index {
 | 
			
		||||
    indexer.add_documents(&payload).unwrap();
 | 
			
		||||
 | 
			
		||||
    let indexer_alloc = Bump::new();
 | 
			
		||||
    let (document_changes, operation_stats, primary_key) =
 | 
			
		||||
        indexer.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map).unwrap();
 | 
			
		||||
    let (document_changes, operation_stats, primary_key) = indexer
 | 
			
		||||
        .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) {
 | 
			
		||||
        panic!("{error}");
 | 
			
		||||
 
 | 
			
		||||
@@ -318,8 +318,9 @@ fn criteria_ascdesc() {
 | 
			
		||||
 | 
			
		||||
    let payload = unsafe { memmap2::Mmap::map(&file).unwrap() };
 | 
			
		||||
    indexer.add_documents(&payload).unwrap();
 | 
			
		||||
    let (document_changes, _operation_stats, primary_key) =
 | 
			
		||||
        indexer.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map).unwrap();
 | 
			
		||||
    let (document_changes, _operation_stats, primary_key) = indexer
 | 
			
		||||
        .into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map, &|| false)
 | 
			
		||||
        .unwrap();
 | 
			
		||||
 | 
			
		||||
    indexer::index(
 | 
			
		||||
        &mut wtxn,
 | 
			
		||||
 
 | 
			
		||||
@@ -127,8 +127,9 @@ fn test_typo_disabled_on_word() {
 | 
			
		||||
    indexer.add_documents(&documents).unwrap();
 | 
			
		||||
 | 
			
		||||
    let indexer_alloc = Bump::new();
 | 
			
		||||
    let (document_changes, _operation_stats, primary_key) =
 | 
			
		||||
        indexer.into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map).unwrap();
 | 
			
		||||
    let (document_changes, _operation_stats, primary_key) = indexer
 | 
			
		||||
        .into_changes(&indexer_alloc, &index, &rtxn, None, &mut new_fields_ids_map, &|| false)
 | 
			
		||||
        .unwrap();
 | 
			
		||||
 | 
			
		||||
    indexer::index(
 | 
			
		||||
        &mut wtxn,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user