Want to find tweets where country code is not mentioned


#1

Hello,

How would I perform a search against twitter.place.country_code where the user hasn’t enabled geo-tracking? For example, say I wanted all the tweets containing a specific string coming from Canada or an unknown location.

Thanks.


#2

You should be able to accomplish this using the NOT operator in combination with the exists operator. For example:

twitter.text contains "my keyword" AND
twitter.place.country_code == "CA" OR
 NOT twitter.place.country_code exists )

This will look for Tweets which contain "my keyword", and are either sent from Canada, or there is no place data available.