Forums / Developer / Advanced search

Advanced search

Author Message

Christophe Saint-Pierre

Thursday 15 January 2009 6:00:39 am

Hi ,
I would like to know i there were possibilities to search in multiple attributes of a classe with or.

For example I search "christophe" in attribute "lastname" or "climbing" in attribute "sport" ?

I know how to search in a specific class and a specific attribute but I don't know how to make or ...

Thanks.

Christophe Condomines

Friday 16 January 2009 1:47:50 am

I think the search module views don't allow this, but you can make something similar using a fetch content/list or content/tree and using the attrbute filtering or Extended attribute filtering

You should have a look to the documentation here:
http://ez.no/doc/ez_publish/technical_manual/4_0/reference/modules/content/fetch_functions/list
There are some examples at the end.

Microblau SL
http://www.microblau.net

Christophe Saint-Pierre

Friday 16 January 2009 4:08:04 am

Yes , I just viewed it :
Attribute filtering

The attribute filter mechanism is controlled by the "attribute_filter" parameter. Attribute filtering makes it possible to fetch a set of nodes where an attribute (or several attributes) contains some specific data. Filtering on the attribute level is supported for the following datatypes:

*
Checkbox
*
Date
*
Date and time
*
E-mail
*
Integer
*
Object relation
*
Selection (will not work when used as multiple selector)
*
Text line
*
Time

Not the XmlBlock.

Thanks.

Mark Simon

Thursday 22 January 2009 8:13:42 am

You can also try to split thesearch request, and add the results together.
Something like:

{set $myfirstresult=fetch(content,search, hash(....

{set $mysecondresult=fetch(content,search, hash(....

Then you have to manually append every entry from $mysecondresult to the first one.
To avoid multiple results check the object id before appending.

You can also use the arraysortoperator extension give the results a better order.

www.all2e.com

eZ debug

Timing: Jan 18 2025 10:52:50
Script start
Timing: Jan 18 2025 10:52:50
Module start 'content'
Timing: Jan 18 2025 10:52:51
Module end 'content'
Timing: Jan 18 2025 10:52:52
Script end

Main resources:

Total runtime1.1560 sec
Peak memory usage4,096.0000 KB
Database Queries199

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0095 588.7031180.8516
Module start 'content' 0.00950.9746 769.5547597.7891
Module end 'content' 0.98410.1718 1,367.3438337.3906
Script end 1.1559  1,704.7344 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.3721210.0002
Check MTime0.00150.1333210.0001
Mysql Total
Database connection0.00230.198010.0023
Mysqli_queries1.071692.70151990.0054
Looping result0.00220.19431970.0000
Template Total1.117696.720.5588
Template load0.00230.197020.0011
Template processing1.115396.484320.5577
Template load and register function0.00030.022910.0003
states
state_id_array0.00190.165610.0019
state_identifier_array0.00100.090020.0005
Override
Cache load0.00200.1696470.0000
Sytem overhead
Fetch class attribute can translate value0.00160.135040.0004
Fetch class attribute name0.00190.161560.0003
XML
Image XML parsing0.00190.160840.0005
class_abstraction
Instantiating content class attribute0.00000.001660.0000
General
dbfile0.00230.1989330.0001
String conversion0.00000.000730.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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/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: 21
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs