Add new error message

This commit is contained in:
ManyTheFish 2024-12-04 11:15:29 +01:00
parent 054622bd16
commit 953a82ca04
3 changed files with 26 additions and 4 deletions

View file

@ -1407,6 +1407,13 @@ pub fn perform_facet_search(
None => TimeBudget::default(),
};
if !index.facet_search(&rtxn)? {
return Err(ResponseError::from_msg(
"The facet search is disabled for this index".to_string(),
Code::InvalidFacetSearchDisabled,
));
}
// In the faceted search context, we want to use the intersection between the locales provided by the user
// and the locales of the facet string.
// If the facet string is not localized, we **ignore** the locales provided by the user because the facet data has no locale.