Friday 06 February 2009 2:20:08 pm
I'm trying to build an advanced search form with multiple criteria (searching objects of only one class). Most of the criteria are things that can be handled with a content/list fetch using attribute_filter, e.g. "such-and-such attribute >= 25". However, I would like to have a general search field as part of the form, where the user can type in words and have eZ Publish do a content/search fetch to search inside any attribute in the class definition marked as searchable. Is there any way to combine these 2 types of searches into 1 search, so that the end result is "objects where attribute_x >= 25 AND attribute_y < 10 AND [any_searchable_field] contains 'mystring'"? I've done something similar in the past, but it involved merging lots of arrays on my own and then writing a custom javascript paginator to page through the resultset because I lost access to the "offset" functionality of the fetch template operator, since I was paging through a custom array of results as opposed to the results of a normal fetch operation. I've never written an extended attribute filter, but I'm not sure if that is the answer to my problem. I would greatly appreciate any advice! Thank you.
Me: http://jordan.teamhirsch.com
My blog: http://wiredformusic.blogspot.com
My other company: http://thinkimprov.com
eZ Certification: http://auth.ez.no/certification/verify/402488
eZ Award: http://ez.no/company/news/ez_awards_2007_prize_winners
|