This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Extensions » eZ Find » exclude class "on the fly"

exclude class "on the fly"

exclude class "on the fly"

Monday 05 July 2010 5:06:00 pm - 4 replies


Is it possible to exclude some classes from the results "on the fly", I mean when the query is made. I have seen a RawFilterList[] in ezfind.ini that could help, but I can not really understand how to use it, and if it make it possible to exclude more than one class.

By the way, the perfect option would be to have a "include" filtering instead of "exclude" ... a little bit like we can do with fetch('content','list|tree' ...)

Thx for your help,

Nico 0

Monday 05 July 2010 7:36:58 pm


"include filtering" is available through the class_id fetch function parameter which takes also arrays

exclude filtering is possible by using a dedicated filter and using the same expression as used in the "hardcoded' ezfind.ini example

{def $results=fetch(ezfind, search, hash('q', '*:*', limit, 10, 
       filter, array('meta_class_identifier_s:[* TO *] -meta_class_identifier_s:folder')))}



Monday 05 July 2010 10:34:49 pm

Thanks Paul,

After posting the question I made a test, and found out that

'filter', array( '-meta_class_identifier_ssad.gif Emoticonclass_to_exclude)') was working ..;

I did not used the meta_class_identifier_s:[* TO *]


Nico O

Monday 05 July 2010 10:55:16 pm

That works too in general: as long as a pure negative query is not the only filter query. Safest bet (with the current version of Solr) is to use the [* TO *] expression along the negative query. The next version of solr will allow it in all cases.



Sunday 03 July 2011 10:48:34 pm

By the way, there is a typo on the example that comes with the ezfind.ini file. The example that shows how to exclude certain classes from apearing on the searchresult list is missing a 'm' it should be like this:

RawFilterList[]=meta_class_identifier_s:[* TO *] -meta_class_identifier_ssad.gif Emoticonfolder article)

should be this instead:

RawFilterList[]=meta_class_identifier_ms:[* TO *] -meta_class_identifier_mssad.gif Emoticonfolder article)


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

36 542 Users on board!

Forums menu

Proudly Developed with from