Skip to content

fix: correct Azure AI search _in delimiter #1729

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sggerard
Copy link

https://learn.microsoft.com/en-us/azure/search/search-query-odata-search-in-function

The azure search.in() filter accepts a list of strings to match against. However the way that the function to normalize the haystack 'in' operator to the azure 'in' operator appears to be incorrect. Despite some of the documentation Microsoft has provided it appears we do need to provide the delimiter to use (In this case ',') as the third parameter.

image

Proposed Changes:

Specify the delimiter to use when building the search.in string.
Remove the extra space used in the join function that would prevent matching.

How did you test it?

I identified this bug when some of my project filters were failing and I couldn't see any reason as to why. I identified this as the issue and after some local debugging and hot fixing the library, and have concluded that at least for my project/ use case this is the appropriate fix.

Notes for the reviewer

This has only been tested against my haystack project and Azure AI search and is no means exhaustive.

@sggerard sggerard requested a review from a team as a code owner May 13, 2025 02:22
@sggerard sggerard requested review from vblagoje and removed request for a team May 13, 2025 02:22
@CLAassistant
Copy link

CLAassistant commented May 13, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants