adrian at gossamer-threads
Apr 29, 2010, 8:27 PM
Post #3 of 4
On 04/29/10 20:17, David E. Wheeler wrote:
> On Apr 29, 2010, at 5:44 PM, Adrian Yee wrote:
>> Hi Everyone,
>> I'm currently fetching a list of stories by using:
>> @stories = Bric::Biz::Asset::Business::Story->list(...);
>> and this is working fine for relatively simple search parameters (dates, keywords, titles, etc). However, we need to now do something more complicated where the story must have one or more keywords, and any of another set of keywords.
>> Is this possible to do using the existing API? Ideas, suggestions?
> I think you can do `keyword => '%'` to get a list of stories with one or more keywords, but there's no way to do it for 2 or more or three or more.
> You can get stories with any of a list of keywords with `keyword => ANY(@list)`.
I should have been a little clearer. I already use keyword =>
ANY(@keywords), but now I need to do something like (not real code
ALL(@all_keywords) and ANY(@any_keywords)