Skip to content

Commit

Permalink
fix: Respect filter condition for Azure AI Search (#13215)
Browse files Browse the repository at this point in the history
  • Loading branch information
joelbarmettlerUZH authored May 3, 2024
1 parent b6fe03c commit 3f7924c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ def _create_odata_filter(self, metadata_filters: MetadataFilters) -> str:
index_field = metadata_mapping[0]

if len(odata_filter) > 0:
odata_filter.append(" and ")
odata_filter.append(" {metadata_filters.condition.value} ")
if isinstance(f.value, str):
escaped_value = "".join([("''" if s == "'" else s) for s in f.value])
odata_filter.append(f"{index_field} eq '{escaped_value}'")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ exclude = ["**/BUILD"]
license = "MIT"
name = "llama-index-vector-stores-azureaisearch"
readme = "README.md"
version = "0.1.4"
version = "0.1.5"

[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
Expand Down

0 comments on commit 3f7924c

Please sign in to comment.