eZ Community » Forums » Extensions » ezfind : weird partial string behavior
expandshrink

ezfind : weird partial string behavior

ezfind : weird partial string behavior

Tuesday 16 June 2015 11:13:36 am - 6 replies

Hello all,

eZFind have a weird behavior for partial search on word.

Here is the case.

One of my content is named "Acoelomate".

My queryText variable is treated like that :

$queryText  = (!empty($params['word'])) ? '(' . $params['word'] . ' OR *' . $params['word'] . '*)' : '*'; 

The weird behavior is that this object is in the search results if search for :

  • lom
  • elom

But it is not in the results if I search for :

  • loma
  • lomat
  • coelomat

Do you have any idea on why ?

Thank you

Tuesday 16 June 2015 4:25:46 pm

Sounds like it could be stemming.  For a scientific database we ended up completely removing configurations like this in schema.xml:

 <filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>

Wednesday 17 June 2015 9:43:24 am

Hi Peter,

Thank you for the reply.

This is something I will try.
Do I need to reindex everything after removing this line ?

Wednesday 17 June 2015 10:04:02 am

I have tried it but no change.

What I did :

  • remove the line from schema.xml
  • empty cache
  • edit the object which should appear (to trigger reindex)
  • do the search on "lomat"
  • still 0 results (instead of 2)

Arghh

Wednesday 17 June 2015 5:13:32 pm

A few notes:

  • After you make a schema.xml change, you have to restart Solr, and preferably run a site re-index
  • Note that the stemming configuration in question is often applied on index and on query, so check your schema.xml for other uses of it
  • For raw Solr debugging I like to use the Query Analyzer at yoursite.com:8983/solr/admin/analysis.jsp?highlight=on.  It is good at showing you how the query is transformed.

Thursday 18 June 2015 10:06:44 am

I have just tried removing this line, restarting solr and reindexing this object but it does not work.

I see in your first answer "removing configurations like this ". It means that I might have to remove other lines right ? What are "line like this" ? Do you I need to search for specific filter ? 

Anyway, thank you for your help

Thursday 18 June 2015 4:30:02 pm

In one of our sites, we removed the "SnowballPorterFilterFactory" filter from the "text" field type for the "index" and "query" analyzers.  I don't want to lead you down the wrong path if it is not a stemming problem, though -- you should use the Query Analyzer at yoursite.com:8983/solr/admin/analysis.jsp?highlight=on to find out more about why queries aren't matching.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from