Azure Search Spell mistake handling - azure

My application is in MVC and I have a search text box based on azure index, its working fine however I have a scenario where in if I enter "chres Harris" instead of "chris Harris" it should return result "chris Harris" but it returns different result like "bob Harris" and then "chris harris", I want the results to be nearabout the same even if there is a spell mistake, please help will any index scoring profile, parameter boost or something useful ?

As of now there are two ways you can handle spelling mistakes in Azure Search.
Use fuzzy queries with Lucene query language. You can boost relevance of exact matches over fuzzy matches for example, search=term^2 OR term~2.
If you deal with names of things, like in your example, configure your index to support phonetic search. Different boosting options to influence relevance are described in the article.
Let me know if none of them don't works for you.

Related

Endeca wild carded search - autocorrection/dym combination

Performing wild carding on wrongly spelled term will not allow autocorrection/dym be calculated for the non wild carded term.
Example:
Searching iphont will be autocorected to iphone and return
results.
Searching for iphont* will not get corrected and return any results or
suggestions.
I understand there is an processing order but is there an OOB way to make this work instead of doing 2 queries (wild carded query, if no results regular query)?
According to documentation wild carded searches don't support several search features like autocorrection, dym, phrased search, thesaurus etc.

Azure search, search by partial terms

Here are two examples for search in the portal, where I would expect to get some results in the second search, even with one letter missing.
The search is in Hebrew language
The full term return some results,
The same term with one letter missing return no results,
There are a few ways you can search for partial terms in Azure Search. You'll need to decide which of the following methods will work best in your scenario. Based on the example it seems either fuzzy search or prefix search will do the job. You can learn about the differences between the these methods in the documentation.
Fuzzy search: blog, documentation
Wildcard search, specifically prefix search: documentation
Regular expression search: documentation
Index partial terms by defining a custom analyzer: blog, documentation
Let me know if you have any questions about any of the above
Check this answer I solve this using a regex and change the GET by a POST request.

Fuzzy Search in the Search API

The Azure search api offers a fuzzy paramter for suggestions. like this:
https://blssuggestions.search.windows.net/indexes/cities/docs/suggest?api-version=2015-02-28&suggesterName=default&fuzzy=true&search=berlen
Would return "Berlin" as a result of berlen.
I can't find a documentation about this how to activate it in a normal search
setting there fuzzy = true seems to not change anything
https://blssuggestions.search.windows.net/indexes/cities/docs?api-version=2015-02-28&search=berlen&fuzzy=true
[Update]: Please see the other responsed about using querytype=full as this response is no longer correct.
This is correct. Fuzzy search is only available currently in the suggestions api.
You need to call:
https://blssuggestions.search.windows.net/indexes/cities/docs/suggest?api-version=2015-02-28&suggesterName=default&queryType=full&search=berlen~
You were missing querytype=full and the tilde after the character that you want to execute fuzzy searches on.
This is now in the preview version of the api:
https://{yourSite}.search.windows.net/indexes/{yourIndex}/docs?search={fieldToSearch}:{lookupValue}~&queryType=Full&api-version=2015-02-28-preview
Note the ~ and queryType=Full, both of which are required to force fuzzy matching.
Documentation is here:
https://msdn.microsoft.com/library/azure/mt589323.aspx
CAVEAT: The fuzzy search is very fuzzy! i.e. dog will match any 3 letter word with only a single matched letter - dim, now, bag
I am trying to figure out how to tune and tweak but as it is still in preview the documentation is sparse.
UPDATE: I just re-read the documentation and it has since been updated with details of an optional distance parameter. I will investigate.

Search option to only return articles about people on Wikipedia

I am trying to search for only people from Wikipedia and return them in some format (ideally using regex, but a simpler search is okay).
The following query is close, but doesn't allow me to include a specific search query and it appears to only included dead people (well I believe historic figures).
http://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=wikipedia&srprop=timestamp&eititle=Template:Persondata
The following query works although I can't seem to limit the results to people only.
http://en.wikipedia.org/w/api.php?action=query&list=embeddedin&eititle=Template:Persondata&eilimit=100&format=xml&redirects
API sandbox |
You want to use Wikidata APIs for semantic searches. Example search for P31 → 5 ("is a human"), using the Wikidata Query Service: http://tools.wmflabs.org/wikidata-todo/autolist.html?q=CLAIM%5B31%3A5%5D

How to combine fuzzy search and field boosting

I'm developing a Lucene search for my Zend 1.12 site. I would like to combine fuzzy search and field boosting. I try syntax like
title:"query"^10~0.8 OR description:"query"~0.8
It seems not to change results. I've also tried to find hints on the Internet, nobody had similar problem. This is query for particular setting and field boosting cannot be set in advance.
The question is: does Lucene support such a combination of modifiers? Is this syntax correct?

Resources