This site has been archived. To learn more about our current products Ibexa Content, Ibexa Experience, Ibexa Commerce head over to the Ibexa Developer Portal

eZ Community » Forums » Extensions » eZ Find » eZ Find filter an indexed field with...
expandshrink

eZ Find filter an indexed field with whitespace doesn't work

eZ Find filter an indexed field with whitespace doesn't work

Monday 17 May 2010 4:47:55 pm - 7 replies

Hello,

I have a user indexed on solr (visible in solr admin)

I want to filter on an attribute "site" (object relation)

I can see that the sub-attribute is indexed well :

<arr name="subattr_site-name_s">
 <str>Malaisie SELANGOR</str>
</arr>

But when I do a filter like that with ezfind or directly in solr admin:

&fq=subattr_site-name_s:France+LIBOURNE

I got the user above returned even if it doesn't match the result.

I have tested with other cases and it always the same when there is a whitespace in the filter.

Anyone got the same problem ?

Thank you for the help !

Monday 17 May 2010 10:04:27 pm

I guess this attribute is indexed as a string type in combination with eZ Find 2.1?

You need to put quotes around the value then:

 &fq=subattr_site-name_s:"France LIBOURNE"

If its indexed as text it should become:

&fq=subattr_site-name_s:(+France +LIBOURNE)

hth

Paul

Modified on Monday 17 May 2010 10:05:23 pm by Paul Borgermans

Monday 17 May 2010 11:06:23 pm

Okay I just tested the query directly in solr and it's working. But this is initially a filter triggered by a facet so it is a classic use case of eZ Find as I declared the attribute as string in eZ Find.

Is this an issue ? Do I need to post this to issues.ez.no ?

If I understood ok the class ezfeZPSolrQueryBuilder should take into consideration if DatatypeMapFilter to check if it is a string and add quotes around filter value ?

Monday 17 May 2010 11:19:59 pm

It works very fine if I add quotes around $value of ezfeZPSolrQueryBuilder::getParamFilterQuery()

Thank you Paul !

Tuesday 18 May 2010 9:42:32 am

This is in fact related to this issue : http://issues.ez.no/16419

Tuesday 18 May 2010 5:47:37 pm

Solved topic ? you may want to mark it as such happy.gif Emoticon

Tuesday 18 May 2010 6:25:07 pm

Done happy.gif Emoticon

Tuesday 18 May 2010 6:30:09 pm

Done happy.gif Emoticon

Cool happy.gif Emoticon

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from