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

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

eZ debug

Timing: Jan 18 2025 18:36:36
Script start
Timing: Jan 18 2025 18:36:36
Module start 'layout'
Timing: Jan 18 2025 18:36:36
Module start 'content'
Timing: Jan 18 2025 18:36:37
Module end 'content'
Timing: Jan 18 2025 18:36:37
Script end

Main resources:

Total runtime0.7552 sec
Peak memory usage4,096.0000 KB
Database Queries73

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0047 588.0156152.6250
Module start 'layout' 0.00470.0035 740.640639.4453
Module start 'content' 0.00810.7458 780.0859659.0156
Module end 'content' 0.75390.0012 1,439.101616.1406
Script end 0.7551  1,455.2422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.4049160.0002
Check MTime0.00130.1690160.0001
Mysql Total
Database connection0.00070.089010.0007
Mysqli_queries0.695392.0714730.0095
Looping result0.00060.0837710.0000
Template Total0.727996.420.3639
Template load0.00200.270520.0010
Template processing0.725896.115820.3629
Template load and register function0.00020.020110.0002
states
state_id_array0.00080.109710.0008
state_identifier_array0.00080.102420.0004
Override
Cache load0.00180.2379430.0000
Sytem overhead
Fetch class attribute can translate value0.00060.085640.0002
Fetch class attribute name0.00100.137690.0001
XML
Image XML parsing0.00200.269840.0005
class_abstraction
Instantiating content class attribute0.00000.0029100.0000
General
dbfile0.00100.1336230.0000
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs