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

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 16:05:22
Script start
Timing: Jan 18 2025 16:05:22
Module start 'layout'
Timing: Jan 18 2025 16:05:22
Module start 'content'
Timing: Jan 18 2025 16:05:22
Module end 'content'
Timing: Jan 18 2025 16:05:22
Script end

Main resources:

Total runtime0.0179 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 587.7969152.6094
Module start 'layout' 0.00740.0028 740.406339.4141
Module start 'content' 0.01020.0052 779.820393.2891
Module end 'content' 0.01540.0025 873.109434.3047
Script end 0.0178  907.4141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002513.8925140.0002
Check MTime0.00105.7434140.0001
Mysql Total
Database connection0.00148.042410.0014
Mysqli_queries0.002313.071130.0008
Looping result0.00000.240010.0000
Template Total0.002112.010.0021
Template load0.00126.884910.0012
Template processing0.00095.039310.0009
Override
Cache load0.00063.356410.0006
General
dbfile0.00021.372280.0000
String conversion0.00000.133440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs