I'm using Umbraco 4.52 and have successfully set up Examine search within a customer website.
The customer has reported that he is unable to search on non-plural versions of words. E.g. he has a field that contains the word Nationals, but when he searches on National he gets no results, even though he does when searching on Nationals.
I understand the StandardAnalyzer, which is being used in this project, simply breaks up textual content on whitespace characters (feel free to point out if this is incorrect), so when indexed, words are indexed as found in the document, plural or not.
I've looked at other analysers and can't see any that seem to further break up words when an s is found at the end, i.e. finds Nationals and stores National and Nationals in the index. Is possible to do this with one of the Analyzers? Or is there some other way of getting around this issue?
I realize this thread is just over a year old, however the topic is still valid. Has any progross been made with the latest version of Examine to get it to handle plurals out of the box?
Umbraco Examine - Indexers
Hi
I'm using Umbraco 4.52 and have successfully set up Examine search within a customer website.
The customer has reported that he is unable to search on non-plural versions of words. E.g. he has a field that contains the word Nationals, but when he searches on National he gets no results, even though he does when searching on Nationals.
I understand the StandardAnalyzer, which is being used in this project, simply breaks up textual content on whitespace characters (feel free to point out if this is incorrect), so when indexed, words are indexed as found in the document, plural or not.
I've looked at other analysers and can't see any that seem to further break up words when an s is found at the end, i.e. finds Nationals and stores National and Nationals in the index. Is possible to do this with one of the Analyzers? Or is there some other way of getting around this issue?
Any advice would be very much appreciated!
There's no OOTB analyzer for Lucene that will handle pluralization for you, but you can use the PorterStemFilter (http://lucene.apache.org/java/2_9_2/api/all/org/apache/lucene/analysis/PorterStemFilter.html) in a custom analyzer to achieve it.
Google has found me this: http://stackoverflow.com/questions/1192671/how-to-enable-stemming-when-searching-using-lucene-net
Many thanks slace. I thought it might be down to using one of the filters, although I wasn't sure which one.
I'm going back to the customer to ensure this really is a requirement as he'll need to pay for the additional development :)
If he does then I'll be sure to look into your solution and may come back here for some further advice.
Thanks again!
I realize this thread is just over a year old, however the topic is still valid. Has any progross been made with the latest version of Examine to get it to handle plurals out of the box?
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.