Search code examples
azuresearchluceneazure-cognitive-search

Azure search- using lucene and filters


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://learn.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


Solution

  • 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.