Take into account PR messages

This commit is contained in:
ManyTheFish 2025-03-10 13:46:33 +01:00
parent ed1dcbe0f7
commit 689e69d6d2
5 changed files with 18 additions and 24 deletions

View file

@ -745,12 +745,14 @@ impl<'a, 'i> Transform<'a, 'i> {
} else {
let facet_operation = necessary_faceted_field(id);
let searchable_operation = settings_diff.reindex_searchable_id(id);
let operation = facet_operation
// TODO: replace `zip.map` with `zip_with` once stable
.zip(searchable_operation)
.map(|(op1, op2)| op1.merge(op2))
.or(facet_operation)
.or(searchable_operation);
let operation = match (facet_operation, searchable_operation) {
(Some(facet_operation), Some(searchable_operation)) => {
Some(facet_operation.merge(searchable_operation))
}
(Some(operation), None) | (None, Some(operation)) => Some(operation),
(None, None) => None,
};
if let Some(operation) = operation {
operations.insert(id, operation);
obkv_writer.insert(id, val)?;

View file

@ -30,10 +30,10 @@ pub struct FacetedExtractorData<'a, 'b> {
sender: &'a FieldIdDocidFacetSender<'a, 'b>,
grenad_parameters: &'a GrenadParameters,
buckets: usize,
filterable_attributes: Vec<FilterableAttributesRule>,
sortable_fields: HashSet<String>,
asc_desc_fields: HashSet<String>,
distinct_field: Option<String>,
filterable_attributes: &'a [FilterableAttributesRule],
sortable_fields: &'a HashSet<String>,
asc_desc_fields: &'a HashSet<String>,
distinct_field: &'a Option<String>,
is_geo_enabled: bool,
}
@ -478,10 +478,10 @@ impl FacetedDocidsExtractor {
grenad_parameters: indexing_context.grenad_parameters,
buckets: rayon::current_num_threads(),
sender,
filterable_attributes,
sortable_fields,
asc_desc_fields,
distinct_field,
filterable_attributes: &filterable_attributes,
sortable_fields: &sortable_fields,
asc_desc_fields: &asc_desc_fields,
distinct_field: &distinct_field,
is_geo_enabled,
};
extract(