Is it an AND or OR condition of attributes in getTwitter processor (Terms to Filter On, Locations to Filter On)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Is it an AND or OR condition of attributes in getTwitter processor (Terms to Filter On, Locations to Filter On)

Mothi86
Hi,

getTwitter processor has 4 attributes
* Languages
* Terms to Filter On
* IDs to Follow
* Locations to Filter On

Is this an AND condition or OR condition between these attributes.

I see that when I filter locations with Canada bounding box and list of terms to filter on - Resulting flowfiles are tweets which are satisfied with locations but not the terms to filter on. Please advise.
Reply | Threaded
Open this post in threaded view
|

Re: Is it an AND or OR condition of attributes in getTwitter processor (Terms to Filter On, Locations to Filter On)

Aldrin Piri
This is driven by the underlying library and service as defined here
https://dev.twitter.com/streaming/overview/request-parameters

From the location section,
https://dev.twitter.com/streaming/overview/request-parameters#locations:

Bounding boxes do not act as filters for other filter parameters. For
> example track=twitter&locations=-122.75,36.8,-121.75,37.8 would match any
> Tweets containing the term Twitter (even non-geo Tweets) OR coming from the
> San Francisco area.
>

If you wish to constrain tweets to a given geo area, you could use NiFi
processors to filter out the desired terms.


On Fri, Jun 23, 2017 at 5:02 PM, Mothi86 <[hidden email]> wrote:

> Hi,
>
> getTwitter processor has 4 attributes
> * Languages
> * Terms to Filter On
> * IDs to Follow
> * Locations to Filter On
>
> Is this an AND condition or OR condition between these attributes.
>
> I see that when I filter locations with Canada bounding box and list of
> terms to filter on - Resulting flowfiles are tweets which are satisfied
> with
> locations but not the terms to filter on. Please advise.
>
>
>
> --
> View this message in context: http://apache-nifi-developer-l
> ist.39713.n7.nabble.com/Is-it-an-AND-or-OR-condition-of-attr
> ibutes-in-getTwitter-processor-Terms-to-Filter-On-Locations-
> to-F-tp16253.html
> Sent from the Apache NiFi Developer List mailing list archive at
> Nabble.com.
>