Forums / Developer / Why fetch can't use the 'like' operator?

Why fetch can't use the 'like' operator?

Author Message

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 eZPublish?
This can make problems?

Greetings (and thanks in advance)

Pablo C. Vergara Castro

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 eZ publish. 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

Pablo C. Vergara Castro

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...

Paul Borgermans

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

hth

-paul

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

eZ debug

Timing: Jan 18 2025 16:12:30
Script start
Timing: Jan 18 2025 16:12:30
Module start 'content'
Timing: Jan 18 2025 16:12:31
Module end 'content'
Timing: Jan 18 2025 16:12:31
Script end

Main resources:

Total runtime1.1266 sec
Peak memory usage4,096.0000 KB
Database Queries210

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0099 587.7344180.8281
Module start 'content' 0.00991.0020 768.5625664.0938
Module end 'content' 1.01190.1146 1,432.6563341.0703
Script end 1.1266  1,773.7266 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.3812210.0002
Check MTime0.00150.1373210.0001
Mysql Total
Database connection0.00200.178010.0020
Mysqli_queries1.046992.92422100.0050
Looping result0.00180.15552080.0000
Template Total1.088696.620.5443
Template load0.00220.199220.0011
Template processing1.086396.419720.5432
Template load and register function0.00020.016210.0002
states
state_id_array0.00150.135910.0015
state_identifier_array0.00110.099020.0006
Override
Cache load0.00270.2371430.0001
Sytem overhead
Fetch class attribute can translate value0.00120.108650.0002
Fetch class attribute name0.00100.090690.0001
XML
Image XML parsing0.00140.124350.0003
class_abstraction
Instantiating content class attribute0.00000.0017100.0000
General
dbfile0.00240.2121340.0001
String conversion0.00000.000430.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs