Problem/Motivation
Currently, if there are multiple filters on indexed fields for a Search API view using an Algolia index, the foreach loop in SearchApiAlgoliaBackend::extractConditions overwrites $options['filters'] on each pass, resulting in invalid syntax and an error message `filters: Unexpected token 'AND' expected filter at col 1`.
Steps to reproduce
Create a view of an Algolia index. Add 2 or more filters on indexed fields and preview the result - the above error message will be shown.
Proposed resolution
Attached patch concatenates multiple filters into the filters option, to generate valid syntax.
Comments
Comment #2
bgilhome commentedA re-roll to be compatible with the patch in https://www.drupal.org/project/search_api_algolia/issues/3223351
Comment #3
nicolas bouteille commentedSo lucky you fixed it for us, thank you for sharing this!
Comment #4
nikunjkotechaNeed an MR to review and merge.
Comment #5
shubhangi1995Comment #8
dieterholvoet commentedComment #9
dieterholvoet commentedComment #10
dieterholvoet commentedThis has been fixed in #3352807: Add support for 'IN' and 'NOT IN' filters.