Filter for string collection field causes error

Created on 10 September 2025, about 1 month ago

Problem/Motivation

When filter query params are built for a sring collection field, there can be an "=" operator that is not compatible with Azure Search AI and returns the following error in the log:

Invalid expression: The operand for a binary operator 'Equal' is not a single value. Binary operators require both operands to be single values. Parameter name: $filter

This was discovered as part of setting up facets for an index created with this module. If this is not the recommended approach for taxonomy facets that have multiple values for a given field, would be happy to try a different approach.

Steps to reproduce

1. Create a field in the index that uses string collection (e.g. a taxonomy reference field with multiple values). Make it filterable and facetable.
2. Create a view and facet for the field.
3. Submit a facet with standard settings (including filter in URL).
4. Add the facet and attempt to filter.

Expected result:

The data is filtered per the facet selection

Actual result:

No data is returned after selecting the facet and the error in the problem above is encountered.

Proposed resolution

Similar to what is currently done for integer collections, handle string collections in the desired odata expression format for Azure Search AI (e.g. tags/any(t: t eq 'Mountain')). I believe this needs to be handled beyond the "IN" operator as an equals operator will result in this error.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024