mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-10-30 23:46:28 +00:00 
			
		
		
		
	Move the FacetStringIter creation logic into a private new method
This commit is contained in:
		| @@ -298,6 +298,16 @@ impl<'t> FacetStringIter<'t> { | ||||
|         index: &'t Index, | ||||
|         field_id: FieldId, | ||||
|         documents_ids: RoaringBitmap, | ||||
|     ) -> heed::Result<FacetStringIter<'t>> { | ||||
|         FacetStringIter::new(rtxn, index, field_id, documents_ids, false) | ||||
|     } | ||||
|  | ||||
|     fn new( | ||||
|         rtxn: &'t heed::RoTxn, | ||||
|         index: &'t Index, | ||||
|         field_id: FieldId, | ||||
|         documents_ids: RoaringBitmap, | ||||
|         must_reduce: bool, | ||||
|     ) -> heed::Result<FacetStringIter<'t>> { | ||||
|         let db = index.facet_id_string_docids.remap_types::<ByteSlice, ByteSlice>(); | ||||
|         let highest_level = Self::highest_level(rtxn, db, field_id)?.unwrap_or(0); | ||||
| @@ -324,7 +334,7 @@ impl<'t> FacetStringIter<'t> { | ||||
|             db, | ||||
|             field_id, | ||||
|             level_iters: vec![(documents_ids, highest_iter)], | ||||
|             must_reduce: false, | ||||
|             must_reduce, | ||||
|         }) | ||||
|     } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user