Skip to content

Commit 8e5fda8

Browse files
sggerardAmnah199
andauthored
fix: correct Azure AI search _in delimiter (#1729)
* correct _in delimiter * update spacing --------- Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>
1 parent b9496c3 commit 8e5fda8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

integrations/azure_ai_search/src/haystack_integrations/document_stores/azure_ai_search/filters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ def _in(field: str, value: Any) -> str:
7979
if not isinstance(value, list) or any(not isinstance(v, str) for v in value):
8080
msg = "Azure AI Search only supports a list of strings for 'in' comparators"
8181
raise AzureAISearchDocumentStoreFilterError(msg)
82-
values = ", ".join(map(str, value))
83-
return f"search.in({field},'{values}')"
82+
values = ",".join(map(str, value))
83+
return f"search.in({field},'{values}',',')"
8484

8585

8686
def _comparison_operator(field: str, value: Any, operator: str) -> str:

0 commit comments

Comments
 (0)