mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Fix some facet indexing bugs
This commit is contained in:
parent
68cbcdf08b
commit
61252248fb
6 changed files with 115 additions and 18 deletions
|
@ -242,6 +242,15 @@ pub fn snap_facet_id_string_docids(index: &Index) -> String {
|
|||
});
|
||||
snap
|
||||
}
|
||||
pub fn snap_field_id_docid_facet_strings(index: &Index) -> String {
|
||||
let snap = make_db_snap_from_iter!(index, field_id_docid_facet_strings, |(
|
||||
(field_id, doc_id, string),
|
||||
other_string,
|
||||
)| {
|
||||
&format!("{field_id:<3} {doc_id:<4} {string:<12} {other_string}")
|
||||
});
|
||||
snap
|
||||
}
|
||||
pub fn snap_documents_ids(index: &Index) -> String {
|
||||
let rtxn = index.read_txn().unwrap();
|
||||
let documents_ids = index.documents_ids(&rtxn).unwrap();
|
||||
|
@ -423,6 +432,9 @@ macro_rules! full_snap_of_db {
|
|||
($index:ident, facet_id_string_docids) => {{
|
||||
$crate::snapshot_tests::snap_facet_id_string_docids(&$index)
|
||||
}};
|
||||
($index:ident, field_id_docid_facet_strings) => {{
|
||||
$crate::snapshot_tests::snap_field_id_docid_facet_strings(&$index)
|
||||
}};
|
||||
($index:ident, documents_ids) => {{
|
||||
$crate::snapshot_tests::snap_documents_ids(&$index)
|
||||
}};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue