Searching on attribute LIKE value

Author Message

Massimiliano Bariola

Tuesday 28 June 2005 6:42:37 am

hi,

is there a way to implement the LIKE functionality for attribute_filter?

e.g. from documentation, I would like to find all nodes whose Text attribute contains the word "the". So, I'd like to pass as condition not "=" but "%" for contains (a-la-mysql).

as far as I know, attribute_filter allows me only to search for the exact match, unless I write my own search extension.

As this is - I suppose - a VERY common need for eZ programmers, I am wondering whether there is a simpler/quicker way.

Paul Borgermans

Tuesday 28 June 2005 9:26:49 am

Hi

This was added in 3.6, see

http://pubsvn.ez.no/nextgen/stable/3.6/doc/features/3.6/content_tree_enhanced_filters.txt

I also created patches againts 3.5.2 and 3.4.6. Still have to do it for the 3.5.3 and 3.4.7 releases:

http://ez.no/community/contribs/hacks/more_attribute_filter_operators_and_fetch_by_owner_id

hth

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Massimiliano Bariola

Tuesday 28 June 2005 10:49:48 am

Yay!!!!

exactly what I needed! thanks Paul for pointing it to me. I was browsing the 3.6 documentation but found no trace of it.

thanks again,

Max

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.