mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 12:27:13 +02:00
Merge the two <facetttype>_faceted_documents_ids methods into one
This commit is contained in:
parent
982efab88f
commit
3d145d7f48
5 changed files with 59 additions and 62 deletions
|
@ -4,6 +4,7 @@ use std::path::Path;
|
|||
|
||||
use roaring::RoaringBitmap;
|
||||
|
||||
use crate::facet::FacetType;
|
||||
use crate::heed_codec::facet::new::{FacetGroupValue, FacetKey};
|
||||
use crate::{make_db_snap_from_iter, ExternalDocumentsIds, Index};
|
||||
|
||||
|
@ -370,7 +371,7 @@ pub fn snap_number_faceted_documents_ids(index: &Index) -> String {
|
|||
let mut snap = String::new();
|
||||
for field_id in fields_ids_map.ids() {
|
||||
let number_faceted_documents_ids =
|
||||
index.number_faceted_documents_ids(&rtxn, field_id).unwrap();
|
||||
index.faceted_documents_ids(&rtxn, field_id, FacetType::Number).unwrap();
|
||||
writeln!(&mut snap, "{field_id:<3} {}", display_bitmap(&number_faceted_documents_ids))
|
||||
.unwrap();
|
||||
}
|
||||
|
@ -383,7 +384,7 @@ pub fn snap_string_faceted_documents_ids(index: &Index) -> String {
|
|||
let mut snap = String::new();
|
||||
for field_id in fields_ids_map.ids() {
|
||||
let string_faceted_documents_ids =
|
||||
index.string_faceted_documents_ids(&rtxn, field_id).unwrap();
|
||||
index.faceted_documents_ids(&rtxn, field_id, FacetType::String).unwrap();
|
||||
writeln!(&mut snap, "{field_id:<3} {}", display_bitmap(&string_faceted_documents_ids))
|
||||
.unwrap();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue