Closed (fixed)
Project:
Porter Algorithm Search Stemmer
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Jun 2009 at 18:55 UTC
Updated:
17 Jul 2009 at 15:10 UTC
In order to fix the excerpt problem, that is where search can't find an excerpt matching the search (due to the search being the stemmed value), can I suggest that you provide a function that returns just the root. So for likely, like, liking all of which return a search key of like the common root function would return lik, or lik.*? which matches all the possible keys. That would enable search excerpt to work will a simple patch to call this function.
Looking at the code I think this could just be a copy of stem functions and then change all the replaces to replace with ''. Would that work?
Comments
Comment #1
jhodgdonYou can use the Stem() function in Porter Stemmer to return the root of a word. That is exactly what it does. For the word "liking", "like" is the grammatical root.
Anyway, I have a fix for the underlying problem with search excerpts now, see #493270: search_excerpt() doesn't work well with stemming
Comment #2
gregglesSince this is already provided, I guess this can be considered a support request and considered fixed.
Thanks @jhodgdon.