Filtering for engagements


#1

Would the recordings from these two filters be identical?

fb.parent.content any “coca cola, diet coke, coke classic”

fb.type == “comment, like, reshare” and fb.parent.content any “coca cola, diet coke, coke classic”


#2

There’s a slight error in your second definition, but yes they would record the same interactions as any interaction which has a fb.parent.* object must be of the fb.type of “comment”, “like” or “reshare”.
The filter I believe you are looking for is:

fb.type IN "comment, like, reshare" AND 
fb.parent.content ANY "coca cola, diet coke, coke classic"

I’m using the IN operator as opposed to ==. Using the == operator would look for a fb.type value which was exactly equal to “comment, like, reshare”, rather than any one of those comma separated values.


#3

OK, in the example below == works because there is only one matching value?

fb.language == “en” and fb.author.country == “United States”


#4

That’s correct. In that example we are looking for fb.language to be exactly equal to “en”, and for fb.author.country to be exactly equal to “United States”.
If we wanted fb.language to be either English or Spanish, we’d have to write:

fb.language in "en, es"

You can check out our documentation on CSDL Operators for full details, and the differences between each operator.