eZ Community » Forums » Extensions » eZ Find » eZ Find - Exclude term not working!

eZ Find - Exclude term not working!

eZ Find - Exclude term not working!

Tuesday 21 February 2012 5:16:39 pm - 3 replies

I have successfully set up eZ Find. Everything works fine except the exclude terms option.
For example, searching for "Beautifull -Day" does not return results that contain the word “Beautifull” but do not contain the word “Day” as provided in the eZ Find documentation. In fact, it returns results containing “Beautifull” and/or “Day".
Phrase search and multiple terms search work fine, it's just the "exclude terms" that is giving me troubles.

Anyone had this problem before? Is there something that I'm missing or haven't set up correctly?

Thank you!

Modified on Tuesday 21 February 2012 5:17:34 pm by Vâlsan Marius Bogdan

Friday 24 February 2012 11:38:28 pm

Turn on your debug output and take a look at what eZ Find is sending to Solr as the query. When I add a dash (-) eZ Find escapes it and sends it to Solr that way. This looks like a bug in eZ Find to me. An escaped dash will not be read by Solr as a dash.

Monday 27 February 2012 8:26:19 pm


On line ~419 of the ezfezpsolrquerybuilder.php file the query is being escaped. If you remove the escapeQuery() you will again have the functionality desired. I am not sure why this was disabled, escaping the the solr syntax like this is the exception not the rule. I did this in my local site and it works fine. Good luck!

Modified on Monday 27 February 2012 8:48:36 pm by Tyler Harms

Monday 13 January 2014 8:13:37 am

Hey, eZ team,

Is that true that excluding functionality is disabled (by escaping the minus character)?


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

36 542 Users on board!

Forums menu

Proudly Developed with from