Share » Forums » Extensions » eZ Find » content(ezfind, search) and extended...

content(ezfind, search) and extended attribute filter

content(ezfind, search) and extended attribute filter

Wednesday 25 March 2009 2:16:04 am - 4 replies

Author Message

Sylvain Gogel

Thursday 26 March 2009 8:32:33 am

Reading EzFind 2.0 doc i found this

filter
The filter is used when creating faceted search templates for drill-down navigation. Filters
are used to limit the search result set without altering the relevancy sort order. Facet
results contain filter definitions that can be used directly. Custom filter definitions can also
be created.
A filter is specified by

<class_identifier>/<class_attribute>[/<sub_structure]:<value>. The
filter option may be a string or list of strings.

Unfortunaltly there is no exemple with sub_structure, can it allow to got throu an object relation?

--
http://www.ecedi.fr
Agence Web, Créa/Conseils, Accessibilité
eZPublish, Drupal, Zend, Symfony

Sylvain Gogel

Tuesday 31 March 2009 5:03:20 am

No one knows how to filter by object relations then?

--
http://www.ecedi.fr
Agence Web, Créa/Conseils, Accessibilité
eZPublish, Drupal, Zend, Symfony

Sylvain Gogel

Tuesday 31 March 2009 8:17:14 am

I finaly find out how to filter by a relation

{def $theme_node= fetch('content', 'node', hash('node_id', $search_theme_node_id))}

then add

'filter', concat('news/themes:',$theme_node.name)

Notice that themes is a object relation list attribute!!
Yata.

Now how can i filter on multiple classes at the same time:

'filter', array( 'or', 											concat('article/theme:',$theme_node.name),													concat('diaporama/theme:',$theme_node.name),
concat('news/theme:',$theme_node.name),
concat('folder/theme:',$theme_node.name),
concat('publication/theme:',$theme_node.name),
concat('quizz/theme:',$theme_node.name)
)

Does not look to work

(no filtering at all, it's like i'm not doing filter at all :( )
Should i mix that with class id?

--
http://www.ecedi.fr
Agence Web, Créa/Conseils, Accessibilité
eZPublish, Drupal, Zend, Symfony

Emmanuel Courmont

Wednesday 01 April 2009 6:47:24 pm

Hi Sylvain,

If you use an 'or' condition you may need to put your condition strings in an <b>array</b>.
Something similar to the example on page 16 of the ezfind2.0 documentation (http://ez.no/doc/extensions/ez_find)

try this:

'filter', array( 'or',
array( concat('article/theme:',$theme_node.name) ),
array( concat('diaporama/theme:',$theme_node.name) ),
array( concat('news/theme:',$theme_node.name) ),
array( concat('folder/theme:',$theme_node.name) ),
array( concat('publication/theme:',$theme_node.name) ),
array( concat('quizz/theme:',$theme_node.name) )
)

Hope it solves your pb.

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu