mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-22 21:04:27 +01:00
Log an error when a facet value is missing from the database
This commit is contained in:
parent
55c17aa38b
commit
8e86eb91bb
@ -3,6 +3,7 @@ use std::fmt;
|
||||
use fst::automaton::{Complement, Intersection, StartsWith, Str, Union};
|
||||
use fst::Streamer;
|
||||
use levenshtein_automata::{LevenshteinAutomatonBuilder as LevBuilder, DFA};
|
||||
use log::{debug, error};
|
||||
use once_cell::sync::Lazy;
|
||||
use roaring::bitmap::RoaringBitmap;
|
||||
|
||||
@ -306,7 +307,10 @@ impl<'a> SearchForFacetValues<'a> {
|
||||
let key = FacetGroupKey { field_id: fid, level: 0, left_bound: value };
|
||||
let docids = match index.facet_id_string_docids.get(rtxn, &key)? {
|
||||
Some(FacetGroupValue { bitmap, .. }) => bitmap,
|
||||
None => todo!("return an internal error"),
|
||||
None => {
|
||||
error!("the facet value is missing from the facet database: {key:?}");
|
||||
continue;
|
||||
}
|
||||
};
|
||||
let count = search_candidates.intersection_len(&docids);
|
||||
if count != 0 {
|
||||
@ -329,7 +333,10 @@ impl<'a> SearchForFacetValues<'a> {
|
||||
let key = FacetGroupKey { field_id: fid, level: 0, left_bound: value };
|
||||
let docids = match index.facet_id_string_docids.get(rtxn, &key)? {
|
||||
Some(FacetGroupValue { bitmap, .. }) => bitmap,
|
||||
None => todo!("return an internal error"),
|
||||
None => {
|
||||
error!("the facet value is missing from the facet database: {key:?}");
|
||||
continue;
|
||||
}
|
||||
};
|
||||
let count = search_candidates.intersection_len(&docids);
|
||||
if count != 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user