Do not consider the searchable field as filterable

This commit is contained in:
Kerollmops 2021-06-23 17:23:43 +02:00
parent 41c4a5b60d
commit c31cadb54f
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -673,6 +673,7 @@ impl<'s, A: AsRef<[u8]>> Store<'s, A> {
let value = let value =
serde_json::from_slice(content).map_err(InternalError::SerdeJson)?; serde_json::from_slice(content).map_err(InternalError::SerdeJson)?;
if self.faceted_fields.contains(&attr) {
let (facet_numbers, facet_strings) = extract_facet_values(&value); let (facet_numbers, facet_strings) = extract_facet_values(&value);
facet_numbers_values facet_numbers_values
.entry(attr) .entry(attr)
@ -682,6 +683,7 @@ impl<'s, A: AsRef<[u8]>> Store<'s, A> {
.entry(attr) .entry(attr)
.or_insert_with(Vec::new) .or_insert_with(Vec::new)
.extend(facet_strings); .extend(facet_strings);
}
if self.searchable_fields.contains(&attr) { if self.searchable_fields.contains(&attr) {
let content = match json_to_string(&value) { let content = match json_to_string(&value) {