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 » How to exclude a term in search ?

How to exclude a term in search ?

How to exclude a term in search ?

Thursday 26 November 2009 11:45:35 am

I'm trying to use ezfind, but I have a problem in my query.

In doc (, I can see :


 fetch( ezfind, search,
hash( query, 'eZ Systems',
filter, array( 'or',
array( 'and',
'article/rating:[1 TO 10]' ),
array( 'and',
'article/rating:[10 TO 20]' )))

Returns all articles containing the words “ez” and “systems”, either having both 'hello' present in the body and a rating comprised between 1 and 10, or having both 'goodbye' in the body and a rating comprised between 10 and 20.

Now, how can I do if I want articles WITHOUT "goodbye" in the body ?

In solr doc (, it says I should use a "-".

But it doesn't work (ezfind error) :

array( 'and',
'article/rating:[10 TO 20]' )))

The error I get :

 Got invalid result from search engine.<html>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 400 </title>
<body><h2>HTTP ERROR: 400</h2><pre>org.apache.lucene.queryParser.ParseException: Cannot parse '( meta_contentclass_id_si:36 AND attr_myattribute_t:myvalue )
 Encountered " ":" ": "" at line 1, column 0.

 Any idea ?

Modified on Thursday 26 November 2009 1:04:22 pm by Nicolas Lescure

No reply yet!


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

36 542 Users on board!

Forums menu

Proudly Developed with from