1
votes

I want to perform an Azure search on a location index (comprising of 100K records of countryCode and location information)

The need is to

a) limit the search to specified country codes
b) be able to handle fuzzy search

I am able to achieve filtered search in simple query syntax using odata syntax on $filter=(countrycode eq 'IN' or countrycode eq 'AT' or countrycode eq 'AU') https://docs.microsoft.com/en-us/rest/api/searchservice/odata-expression-syntax-for-azure-search

I am able to achieve fuzzy search using Lucene search by queryType=full&search=euroe~1 as per this syntax

queryType=full&search=sydne~1&$filter=CountryCode eq 'AT' or CountryCode eq 'AU' &searchMode=All

Is there a way to use a contains instead of multiple eq. The syntax seems to be limited

2

2 Answers

1
votes

There is no syntax for set containment in Azure Search. If this feature is important to you, please add an item to User Voice to help the Azure Search team prioritize.

0
votes

Late answer, but what about search.in?

Your request could be:

queryType=full&search=sydne~1&$filter=search.in(CountryCode, 'AT, AU')&searchMode=All

You can find more info on OData expression syntax for Azure Search