[twitter-dev] Logical AND supported in streaming API filter endpoint

28 views
Skip to first unread message

Mark McBride

unread,
Apr 19, 2010, 7:39:09 PM4/19/10
to twitter-deve...@googlegroups.com, twitter-ap...@googlegroups.com
To date the streaming API has only supported logical OR in track
keywords (http://apiwiki.twitter.com/Streaming-API-Documentation#track).
 Today we're happy to announce that we support logical ANDing in
production as well.

The track parameter is treated as a series of phrases. Phrases are
separated by commas. Words within phrases are delimited by spaces. A
tweet matches if any phrase matches. A phrase matches if all of the
words are present in the tweet. (e.g. 'the twitter' is 'the' AND
'twitter', and 'the,twitter' is 'the' OR 'twitter'.).  Some
examples...
1) "twitter api,twitter streaming"
(http://stream.twitter.com/1/statuses/filter.xml?track=twitter+api%2Ctwitter+streaming)
will match the tweets "The Twitter API is awesome" and "The twitter
streaming deal is fast", but not "I'm new to Twitter"
2) The same approach to dealing with case, punctuation, @replies and
hashtags still applies.  So "chirp search,chirp streaming"
(http://stream.twitter.com/1statuses/filter.xml?track=chirp+search%2Cchirp+streaming)
will match "Listening to the @chirp talk on search", "I'm at Chirp
talking about search!", and "loving this search talk #chirp"

This should dramatically close the gap on what you can do with the
search API but not with streaming, and also reduce the amount of data
users have to consumer to match on multiple keywords.
Comments/questions welcome as always.

  ---Mark

http://twitter.com/mccv


--
Subscription settings: http://groups.google.com/group/twitter-development-talk/subscribe?hl=en

M. Edward (Ed) Borasky

unread,
Apr 20, 2010, 1:03:07 AM4/20/10
to twitter-deve...@googlegroups.com, Mark McBride
Awesome!

--
M. Edward (Ed) Borasky
borasky-research.net/m-edward-ed-borasky

"A mathematician is a device for turning coffee into theorems." ~ Paul Erdős

Alam Sher

unread,
Apr 20, 2010, 1:14:44 AM4/20/10
to twitter-deve...@googlegroups.com, Mark McBride
I love you guys. You did it ... That has increased the Streaming usability to some 1000 times.

Thanks in million ways,
Alam Sher
--
_______________
Alam Sher Khan
+92 331 505 5549

Karthik

unread,
Apr 23, 2010, 6:10:15 AM4/23/10
to Twitter Development Talk
Great!! Many thanks to the Streaming API Team. You've done this, just
when I needed it.

Jeffrey Greenberg

unread,
Apr 23, 2010, 8:52:35 AM4/23/10
to twitter-deve...@googlegroups.com
When will we get - aka "not"?

John Kalucki

unread,
Apr 23, 2010, 9:12:26 AM4/23/10
to twitter-deve...@googlegroups.com
When we can squeeze it in and after we understand various cost issues.
Reply all
Reply to author
Forward
0 new messages