0

I am trying a search in Experience Profile in Sitecore 8.1-3 with Solr 4.10 as the search provider. I am noticing that sometimes it returns results that don't seem to match the search query at all. For example - if I search for John Doe in the search bar, here is the query that I see in the search log file:

?q=(type_t:(contact) AND (contact.fullname_t:(John Doe~0.5) OR contact.emails_sm:(John Doe~0.5)))&start=0&rows=100&fl=*,score&fq=_indexname:(sitecore_analytics_index)

And when I run that query manually through the Solr interface I get back results that don't seem to match at all. I'm not sure what the ~0.5 part of the query is. Is that some sort of fuzzy match or something?

1 Answer 1

1

This is a fuzzy query where 0.5 is similarity index

The similarity measurement is based on the Damerau-Levenshtein (optimal string alignment) algorithm. Sometimes you may get unexpected results in that case.

In your case, I believe that you are getting unexpected results because ~0.5 similarity applies to both terms John and Doe.

2
  • Interesting. So I am wondering exactly how the search code works for the Experience Profile search. It seems to me like maybe it first tries a regular search with the given text, then if it return zero results it retries the search using the fuzzy query. Is that right? Commented Jan 11, 2017 at 19:46
  • @CoreyBurnett I think you should check the Search.log for that. if you see two consecutive queries, i.e. one is not fuzzy, and the following one is fuzzy, then it proves your theory. Otherwise, it's just trying to make a fuzzy search regardless of results from concrete query Commented Jan 11, 2017 at 20:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.