As far as I can tell, there are two ways to search tasks:
/=/action/BTDT.Action.TaskSearch
/=/search/BTDT.Model.Task
The action seems really easy to use: there's *_before and *_after for
the date fields, *_not versions of a lot of things, and I can get the
tasks for a particular tag.
The search has documented paging and multiple asc/desc order_by
features ( http://hiveminder.com/=/help/search ), which work as
advertised. However, previous messages in this group have called it
"simplistic": it doesn't support "not", and I can't for example get it
to return tasks for a particular tag.
I tried to get multiple order_by using the action by adding more than
one value for that post field (-F in curl), but it complained. Also,
I'm not sure how to do asc/desc or paging. Does anyone know if these
features exist in the action? Also, please let me know if I've missed
something.
Thanks,
-Warren
On 3/14/10 10:12 PM, Warren wrote:
> Hi,
>
> As far as I can tell, there are two ways to search tasks:
>
> /=/action/BTDT.Action.TaskSearch
> /=/search/BTDT.Model.Task
Yes. The /=/search interface is very generic; it works for every model
type. The TaskSearch action is very specifically for tasks, so it can be
smarter.
> The search has documented paging and multiple asc/desc order_by
> features ( http://hiveminder.com/=/help/search ), which work as
> advertised. However, previous messages in this group have called it
> "simplistic": it doesn't support "not", and
I've just implemented "not" for this interface, so it'll be live in
Hiveminder soon.
> I can't for example get it to return tasks for a particular tag.
Yeah, this is because /=/search is generic and doesn't know that tags
are special; it just sees a string field called "tags" and doesn't know
that there is actually more structure there.
Adding support for tags in /=/search is a good idea, but it's not
something I can do right now while writing this email, like I could for
"not". :)
> I tried to get multiple order_by using the action by adding more than
> one value for that post field (-F in curl), but it complained. Also,
> I'm not sure how to do asc/desc or paging. Does anyone know if these
> features exist in the action? Also, please let me know if I've missed
> something.
It's been a while since I've looked at this corner of the code, so I
could be wrong, but it appears that multiple orderings and paging are
indeed not available from the TaskSearch action. I'll take this to be
another feature request!
> Thanks,
>
> -Warren
Shawn
On Thu, Mar 18, 2010 at 5:26 AM, Shawn M Moore <sar...@bestpractical.com> wrote:
> On 3/14/10 10:12 PM, Warren wrote:
>> The search has documented paging and multiple asc/desc order_by
>> features ( http://hiveminder.com/=/help/search ), which work as
>> advertised. However, previous messages in this group have called it
>> "simplistic": it doesn't support "not", and
>
> I've just implemented "not" for this interface, so it'll be live in
> Hiveminder soon.
Thanks!
>> I can't for example get it to return tasks for a particular tag.
>
> Yeah, this is because /=/search is generic and doesn't know that tags
> are special; it just sees a string field called "tags" and doesn't know
> that there is actually more structure there.
>
> Adding support for tags in /=/search is a good idea, but it's not
> something I can do right now while writing this email, like I could for
> "not". :)
The issue is that (as far as I can tell) it doesn't do substring
matching. I just wanted to make sure I wasn't missing anything.
If you were to revisit it, you could also throw in inequality testing
(before/after) for dates. But if you add paging and multiple sort
orders to TaskSearch, then that would make it a superset of the
features available in /=/search, which would be plenty for me. When
you get around to that, please drop a note in here.
Thanks for the info,
-Warren