Smart Search does not work correctly with names that end in 'y'

Dustin Christians asked on April 26, 2017 16:50

When searching for people on one of our websites, smart search does not return any of the people that have names that end in 'y', on the front end of the site, when they are searched for by their full first name. For example, when searching for 'Tiffany', that person does not show up in the results on the search page, but they do show up in the Kentico UI screens when using that indexes smart search preview.

When I search for 'Tiffan' without the ‘y’, that person does show up in the search results on the search page and in the smart search preview within the Kentico UI.

The analyzer type of the index is set to 'Subset'. Rebuilding the index doesn't change anything. We created a single page with just the 'Search Results' web part and the 'Smart Search Box' web part on it to remove the likelihood that something else on the site might be causing an issue but we still have the same problem.

Kentico Version = 8.2.48

Any ideas? Thanks!

Correct Answer

Chetan Sharma answered on April 27, 2017 15:19

If that's the case you must enable Fuzzy search to allow it to handle misspelled words.

There will be an option in web part in the form of a checkbox. try if that helps.

2 votesVote for this answer Unmark Correct answer

Recent Answers


Roman Hutnyk answered on April 27, 2017 08:51

Have you tried to search for Tiffany in Kentico admin? Does it find her?

Is there a chance there is some html tag, that is not visible, right before 'y'? - I'd try to re-enter Tiffany's name in Kentico admin and rebuild index, just to make sure there is no issue with encoding, etc.

I have a site that also searches users on the front end, uses subset analyzer type v8.2.34 and it searches for Tiffany without any issues.

0 votesVote for this answer Mark as a Correct answer

Chetan Sharma answered on April 27, 2017 13:16

Dustin, what is the reason you are using subset analyzer? Is standard analyzer not suitable for your needs?

0 votesVote for this answer Mark as a Correct answer

Dustin Christians answered on April 27, 2017 15:12

It appears as though having two different search indexes in the same Smart Search Results web part is causing the problem. In the "Indexes" field of the web part I had this:

"CodeName.People;CodeName.DocumentsSearch"

When I remove "CodeName.DocumentsSearch" I get the correct results back from the "CodeName.People" index when I search for "Tiffany".

I get the correct results when I use two different "Smart search results" web parts for each index on the same page as well. Using two different web parts should work but it seems like there is still an issue when using two different indexes in the same Smart Search Results web part or the settings on the indexes are conflicting. Just for reference, the "CodeName.DocumentsSearch" index is using the "Stop words with stemming" analyzer type.

Chetan, after reading about the difference between subset and standard analyzers it appears that standard may be more efficient. I switched to standard as a quick test, rebuilt the index and cleared the system cache. When searching for 'Tiffany', with the standard index, the search returns the correct results, but when searching for 'Tiff' the search returns nothing. Therefore, the standard analyzer does not meet our requirements. Thanks for the suggestion!

Roman, I tried rebuilding the index but the results were still incorrect and yes, Tiffany is found in the Kentico admin when I search for 'Tiffany' or 'Tiff'. Thanks for the help!

0 votesVote for this answer Mark as a Correct answer

Dustin Christians answered on April 27, 2017 15:30

Chetan’s suggestion works. I checked the "Typo tolerant search" in the Smart Search Results web part and I get the correct results back with both indexes. Thanks!

Although, searching for 'Tiffany' is not a misspelling, so there is still something weird going on. In any case, problem solved.

1 votesVote for this answer Mark as a Correct answer

Chetan Sharma answered on April 27, 2017 15:36

Hi Dustin,

Replying through my mobile phone. So please forbear typos.

Difficult to say without index. There is a tool called Luke. It has an executable jar. You can load your index into it to see how your data is indexed with Lucene. Im sure you're aware that Kentico used Lucene as a full text search engine.

You can exactly what is stored by running queries. Luke has its on UI to quickly ruin through data and provides you with a rich UI.

Please try that.

Thanks, Chetan

2 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.