Reputation: 51
Need help with the query to combine proximity search and fuzzy search in Azure. Index has items below:
Search term: Universty of Washington - (University misspelled)
This should return record 1. i.e Fuzzy matching on University and Proximity match on rest of the words.
Upvotes: 4
Views: 3134
Reputation: 1
rachel~ ray~ cookware~1
Please try this fuzzy search with Edit distance 1. working
Upvotes: 0
Reputation: 405
From the Azure Search documentation:
To do a fuzzy search, use the tilde "~" symbol at the end of a single word with an optional parameter, a number between 0 and 2 (default), that specifies the edit distance. For example, "blue~" or "blue~1" would return "blue", "blues", and "glue".
Insert a tilde "~" symbol at the end of a phrase followed by the number of words that create the proximity boundary. For example, "hotel airport"~5 will find the terms "hotel" and "airport" within 5 words of each other in a document.
Based on this documentation, I can construct a query that combines fuzzy and proximity search
“Universty~ of~ Washington~”~5
Note that you must use Lucene query syntax for this to work
Upvotes: 2