#3592233: Preserve query filter groups and integer collections

Closes #3592233

Problem/Motivation

Search API condition groups are not preserved when Azure filter parameters are built.

When a query contains a nested OR condition group, QueryFilterBuilder::buildQueryFilters() currently merges nested filters into the parent filter list. Later, QueryParamBuilder joins the returned filters with and, which can change the intended logic.

For example, a query intended to filter by (bibcite_year eq 2024 or bibcite_year eq 2025) can be flattened into separate filters and combined as bibcite_year eq 2024 and bibcite_year eq 2025.

The same area also affects multi-value integer fields that are represented in Azure as collections. Those fields must be filtered using Azure's any(...) syntax instead of scalar equality.

Resolution

Refactor condition filter building into a dedicated helper method, preserve nested condition groups by joining them with their own conjunction, and wrap top-level OR groups in parentheses.

Add integer collection filter handling for the affected multi-value integer field.

Merge request reports

Loading
Loading