Forums / Developer / Why fetch can't use the 'like' operator?
Pablo C. Vergara Castro
Friday 11 March 2005 3:19:03 am
Hi to all.
This message has been sent specially to the ez crew but if somebody can answer to me it is well.
In this days I have been developing a web site in which I need the user can make searches in certain attributes of objects of a class, and after studying the search operator I have verified which it does not finish serving me for which I look for (since she does not make search like which they are possible to be obtained with operator LIKE of any SQL database), then I have looked for the way to use LIKE with fetch('content', 'list',hash(attribute_filter(array(...,'like',...)))..) and have seen two links which comment as operator LIKE can be used: http://www.ez.no/bugs/view/2900 and http://www.ez.no/bugs/view/3865
So as the links explain, the only think somebody need to do is to hack the source code of kernel/classes/ezcontentobjecttreenode.php and to add a pair of lines, the something that I have proven and IT WORKS!!!.
Then my question is: Why this option can't be added to the official code of Exponential?This can make problems?
Greetings (and thanks in advance)
Monday 14 March 2005 3:06:03 am
As Pink Floyd song: "Is there anybody out there?"
Can somebody respond my question?
Frederik Holljen
Tuesday 15 March 2005 12:36:14 am
We are very thankfull for patches to Exponential. If you want to contribute your code, the details are explained here: http://ez.no/community/developer
Paul Borgermans
Sunday 20 March 2005 7:19:53 am
Pablo,
Amos checked in my patch + some improvements into the trunk: like, not_like, in, not_in, between and not_between are now added as attribute filter operators. Additionally, you can also filter on the owner which should be provided as its corresponding object id.
I'll provide a patch for 3.4-stable and 3.5-stable branches after the weekend and write a doc about how to use them.
hth
-paul
eZ Publish, eZ Find, Solr expert consulting and training http://twitter.com/paulborgermans
Monday 21 March 2005 1:37:11 am
Really really thanks Paul... but I found the reason the people don't use fetch to "extended searches"... the reason is that fetch can not filter xmltext attributes (and I think textfield too).
Andrew Vorobyov
Saturday 28 May 2005 11:57:50 pm
By Paul Borgermans: ================= I'll provide a patch for 3.4-stable and 3.5-stable branches after the weekend and write a doc about how to use them.====================
Paul, did you success?Where i can read this doc?
and pls - direct me how to make NOT, and OR searches..
Its BASIC feature but EZ can't make it still...
Please, regards...
Sunday 29 May 2005 2:11:08 am
See:
http://ez.no/community/contribs/hacks/more_attribute_filter_operators_and_fetch_by_owner_id
These features are now standard in 3.6