Forums / Extensions / eZ Find / How to search the exact word by Ezfind ?

How to search the exact word by Ezfind ?

Author Message

kingsun he

Wednesday 19 January 2011 7:36:03 pm

Hello, I'm using the ezfind extension. But I can't search the exact word. For example, when I search the text "consid", the article with word "considered" will be searched. How can I do some settings so that Ezfind can search the exact word?

Guillaume Kulakowski

Thursday 20 January 2011 4:53:19 am

What is your default search handler ([SearchHandler] / DefaultSearchHandler in ezfind.ini)? I have heuristic and if I search "Strasb" insted "Strasbourg", I have no response.

My blog : http://www.llaumgui.com (not in eZ Publish ;-))
eZC on RHEL : http://blog.famillecollet.com/pages/Config-en
eZC on Fedora : just "yum install php-channel-ezc"

kingsun he

Thursday 20 January 2011 6:49:54 pm

My DefaultSearchHandler is heuristic too. So strange.

kingsun he

Thursday 20 January 2011 6:54:02 pm

I have set it to heuristic.

Paul Borgermans

Monday 07 February 2011 1:47:46 pm

What you see is the stemming in action which is enabled by default.

If you really want to turn this off, you need to edit the solr schema.xml file and remove the stemming step for the "text" type field.

Then re-index (as with any schema change) and you will only have matches of the exact term (still case insensitive and with accesnts removed)

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Gaetano Giunta

Tuesday 08 February 2011 1:47:30 am

Also, if you just want to prevent some words to be stemmed, and not all of them (common case: the company name and its products), you can modify the protwords.txt configuration file. It's a list of words to which stemming is not applied.

Principal Consultant International Business
Member of the Community Project Board