You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@esme.apache.org by Ethan Jewett <es...@gmail.com> on 2010/01/16 18:12:04 UTC

Tag filtering is checked in for api2/pools/POOLID/messages?history method

Hi all,

I just checked in tag filtering for the api2/pools/POOLID/messages
endpoint. Filtering is only available on the history queries and
currently only for pools. Filtering on streaming queries should be
done client-side.

The query that passes unit testing is
"pools/6/messages?history=10&filter_tags=test,tag", which will return
a list of the last 10 messages that have both "tag" and "test" in the
tag field. This is an "and" query, not an "or" query, so the messages
will have to have all tags specified in the filter. We can get fancier
as I get more comfortable with Compass/Lucene search syntax :-)

As you might have guessed from the last sentence, this is implemented
using the Compass search, so it should be pretty fast and should be
pretty easy on the message database.

I haven't added this to the API documentation page yet, and I'm still
not sure about the syntax, but if anyone (Sig?) wants to kick the
tires, go for it.

Ethan

Re: Tag filtering is checked in for api2/pools/POOLID/messages?history method

Posted by Sig Rinde <si...@rinde.com>.
Yay, implemented on our side (by junior as always)! So far so good,
now to create tons of messages to test... sigh :)

Thanks Ethan, very efficient indeed!

Sig

2010/1/16 Sig Rinde <si...@rinde.com>:
> Tire kicking afoot! Junior's been nudged into gear... *grinding
> noises* from student on holiday can be heard... :)
>
>
> 2010/1/16 Ethan Jewett <es...@gmail.com>:
>> Hi all,
>>
>> I just checked in tag filtering for the api2/pools/POOLID/messages
>> endpoint. Filtering is only available on the history queries and
>> currently only for pools. Filtering on streaming queries should be
>> done client-side.
>>
>> The query that passes unit testing is
>> "pools/6/messages?history=10&filter_tags=test,tag", which will return
>> a list of the last 10 messages that have both "tag" and "test" in the
>> tag field. This is an "and" query, not an "or" query, so the messages
>> will have to have all tags specified in the filter. We can get fancier
>> as I get more comfortable with Compass/Lucene search syntax :-)
>>
>> As you might have guessed from the last sentence, this is implemented
>> using the Compass search, so it should be pretty fast and should be
>> pretty easy on the message database.
>>
>> I haven't added this to the API documentation page yet, and I'm still
>> not sure about the syntax, but if anyone (Sig?) wants to kick the
>> tires, go for it.
>>
>> Ethan
>>
>

Re: Tag filtering is checked in for api2/pools/POOLID/messages?history method

Posted by Sig Rinde <si...@rinde.com>.
Tire kicking afoot! Junior's been nudged into gear... *grinding
noises* from student on holiday can be heard... :)


2010/1/16 Ethan Jewett <es...@gmail.com>:
> Hi all,
>
> I just checked in tag filtering for the api2/pools/POOLID/messages
> endpoint. Filtering is only available on the history queries and
> currently only for pools. Filtering on streaming queries should be
> done client-side.
>
> The query that passes unit testing is
> "pools/6/messages?history=10&filter_tags=test,tag", which will return
> a list of the last 10 messages that have both "tag" and "test" in the
> tag field. This is an "and" query, not an "or" query, so the messages
> will have to have all tags specified in the filter. We can get fancier
> as I get more comfortable with Compass/Lucene search syntax :-)
>
> As you might have guessed from the last sentence, this is implemented
> using the Compass search, so it should be pretty fast and should be
> pretty easy on the message database.
>
> I haven't added this to the API documentation page yet, and I'm still
> not sure about the syntax, but if anyone (Sig?) wants to kick the
> tires, go for it.
>
> Ethan
>