Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
1,339 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
My aim is to retrieve filtered search docs based on values present in two different fields of Collection(Edm.String) type.
for example:
field1 = ['A', 'D']
field2 = ['B', 'C', 'E']
When I perform a search query in the azure portal UI using the following filter expression, I do not see the desired results which in this case should be zero documents but I do see some documents.
$filter = fieldA/any(a: a eq 'F') and fieldB/any(b: b eq 'C')
When I perform the same filter query on the search index using python SDK, I get zero retrieved docs which I is the desired result.
results = search_client.search(
search_text=query,
vector_queries= [vector_query],
filter="fieldA/any(a: a eq 'F') and fieldB/any(b: b eq 'C')",
select=["title_name", "chunk", "page_start"],
top=6
)
retrieved_docs = list()
for doc in results:
retrieved_docs.append(doc)
>>> retrived_docs is []
Can someone please explain what am I doing wrong in the $filter query? TIA