Porter stemmer project is not integrating with Search Lucene API

scotjam - August 25, 2009 - 21:24
Project:Search Lucene API
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I've installed porter stemmer module and have rebuilt the index, but I'm still unable to search using shortened version of words, such as 'class' rather than 'classes' or 'store' instead of 'storing' etc.

The news section of http://drupal.org/project/luceneapi page says that a new hook is exposed, called hook_search_preprocess(), but do I need to do anything else to make this work? It doesn't work for me out of the box.

Help appreciated,

#1

cpliakas - August 26, 2009 - 17:20

Hi scotjam.

Which version of the module are you using? Support for Drupal word stemmers was added in the Alpha 1 release, and you need the alpha1 version of the ZF components. The Drupal analyzer which invokes hook_search_preprocess() should be selected by default.

Thanks,
Chris

#2

scotjam - August 26, 2009 - 21:13

Hi Chris

I'm using: Search Lucene API 6.x-2.x-dev; with ZF lib 6.x-2.0-alpha1; and Porter Stemmer 6.x-2.0.

You mentioned the 'drupal analyser' should be selected by default? Is this an option? As far as I can tell I don't get any setup options with Porter Stemmer.

Other than installing the modules and re-indexing; is there anything else I need to do?

cheers
Jamil

#3

cpliakas - August 26, 2009 - 21:20

If the "Drupal" analyzer is the only one that is available, then it is not exposed as an option and the module will use that one by default. The Analyzer itself invokes hook_search_preprocess(), which is implemented by the Porter Stemmer project. Therefore you don't have to do anything other than re-index your content. I would definitely try an alpha version of the module just to make sure you have a version of the code that supports the new functionality. Thanks, and please let me know if it still does not work.

#4

scotjam - August 26, 2009 - 21:52

Update... I've just installed the alpha version found here (http://ftp.drupal.org/files/projects/luceneapi-6.x-2.0-alpha2.tar.gz), and after re-indexing, I still don't get results that I would have expected, for example a search for the word 'electronic' and a search for 'electronics' return different results. I would have expected porter stemmer to have taken the 's' off the word and so both search would return the same number of results. It's nothing urgent so no worries if this can't be resolved anytime soon. thanks

#5

cpliakas - August 30, 2009 - 14:03

I can't seem to replicate the bug. I searched for the exact words you specified and got the desired result. Maybe it may be worth manually deleting the luceneapi_node index directory and re-index? Please let me know if that works, as he module will need better "Wipe index" functionality if that is the case.

#6

cpliakas - September 29, 2009 - 13:30
Title:porter stemmer - how does it work with search lucene?» Porter stemmer project is not integrating with Search Lucene API
Category:support request» bug report
Priority:normal» minor

Switching to a bug report so that others can confirm the bug. If anyone else is experiencing a similar issue, please post! Similarly, feel free to post if the functionality works in your installation. Both would be helpful to get a better scope of the problem.

#7

cpliakas - October 13, 2009 - 15:58
Priority:minor» normal

The bug has been confirmed. A fix will be committed and reflected in the upcoming alpha5 release.

#8

cpliakas - October 13, 2009 - 17:19
Status:active» fixed

Fixed in commit #274400.

#9

System Message - October 27, 2009 - 17:20
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.