mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-10-26 05:26:27 +00:00 
			
		
		
		
	Add explanatory comment
This commit is contained in:
		
				
					committed by
					
						 Louis Dureuil
						Louis Dureuil
					
				
			
			
				
	
			
			
			
						parent
						
							32c78ac8b1
						
					
				
				
					commit
					2bae9550c8
				
			| @@ -60,6 +60,9 @@ pub fn bucket_sort<'ctx, Q: RankingRuleQueryTrait>( | ||||
|  | ||||
|             let mut all_candidates = universe - excluded; | ||||
|             all_candidates.extend(results.iter().copied()); | ||||
|             // drain the results of the skipped elements | ||||
|             // this **must** be done **after** writing the entire results in `all_candidates` to ensure | ||||
|             // e.g. estimatedTotalHits is correct. | ||||
|             if results.len() >= from { | ||||
|                 results.drain(..from); | ||||
|             } else { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user