mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-11-04 09:56:28 +00:00 
			
		
		
		
	Correctly count indexed documents
This commit is contained in:
		@@ -82,8 +82,10 @@ impl<'pl> DocumentOperation<'pl> {
 | 
				
			|||||||
                ),
 | 
					                ),
 | 
				
			||||||
            };
 | 
					            };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            let mut document_count = 0;
 | 
				
			||||||
            let error = match result {
 | 
					            let error = match result {
 | 
				
			||||||
                Ok(new_docids_version_offsets) => {
 | 
					                Ok(new_docids_version_offsets) => {
 | 
				
			||||||
 | 
					                    document_count = new_docids_version_offsets.len() as u64;
 | 
				
			||||||
                    // If we don't have any error then we can merge the content of this payload
 | 
					                    // If we don't have any error then we can merge the content of this payload
 | 
				
			||||||
                    // into to main payload. Else we just drop this payload extraction.
 | 
					                    // into to main payload. Else we just drop this payload extraction.
 | 
				
			||||||
                    merge_version_offsets(&mut docids_version_offsets, new_docids_version_offsets);
 | 
					                    merge_version_offsets(&mut docids_version_offsets, new_docids_version_offsets);
 | 
				
			||||||
@@ -93,11 +95,7 @@ impl<'pl> DocumentOperation<'pl> {
 | 
				
			|||||||
                Err(e) => return Err(e),
 | 
					                Err(e) => return Err(e),
 | 
				
			||||||
            };
 | 
					            };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            operations_stats.push(PayloadStats {
 | 
					            operations_stats.push(PayloadStats { document_count, bytes, error });
 | 
				
			||||||
                document_count: docids_version_offsets.len() as u64,
 | 
					 | 
				
			||||||
                bytes,
 | 
					 | 
				
			||||||
                error,
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // TODO We must drain the HashMap into a Vec because rayon::hash_map::IntoIter: !Clone
 | 
					        // TODO We must drain the HashMap into a Vec because rayon::hash_map::IntoIter: !Clone
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user