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.