Forums / Developer / Several extended_attribute_filter in the same fetch???

Several extended_attribute_filter in the same fetch???

Author Message

Nicolas Bayol

Monday 16 April 2007 10:00:38 am

Hi,
The background is: development of a search engine with many criteria.

I would like to know if it's possible to use several extended_attribute_filter in the same fetch.

This already works:

fetch('content', 'list', 
       hash('parent_node_id', 62,
                           .....
'extended_attribute_filter', hash('id','ExtendedImageFilter',
		 			'params', hash( 'attribute', 212 ) ) ) )}

I tried something like this but without success:

fetch('content', 'list', 
        hash('parent_node_id', 62,
                         .....
	'extended_attribute_filter', hash('id','ExtendedImageFilter',
		 				     'params', hash( 'attribute', 212 ) )
        'extended_attribute_filter', hash('id','ExtendedKeywordFilter',
		 				     'params', hash( 'attribute', 220 ) )

 ) )}

I also tried with an array of several hash but I didn't manage to have something correct.

More simply I try to make the same thing that attribute_filter does, with array of array, like this:

fetch('content', 'list', 
        hash('parent_node_id', 62,
                       .....
		'attribute_filter', array( 'and',
                                      array( 'priority', '>', '20' ),
                                      array( 'article/title', '=', 'abc' ) ) ) )}

I'm a rookie in eZ development and maybe you will be able to help me.
Regards,

..:: Nicolas BAYOL ::..

Hans Melis

Tuesday 24 April 2007 2:07:54 pm

Hiya,

Better late than never, but multiple extended attribute filters is indeed a no-go. The only solution is to write a combined extended attribute filter so that you only have to pass additional parameters to the filter.

Hans
http://blog.hansmelis.be