Filtering By Keywords

Often you will want to filter social data to find conversation containing any of a number of keyword terms.

For example you might want to find conversations relating to soft drinks, looking for the following terms:

coke, coca-cola, pepsi, 7-up, soda

To get a broad set of results, you can look in two places for the terms:

  1. Content of the conversation itself
  2. Meta data for links that have been shared (powered by the Links augmentation)

Note you must enable the Links augmentation to filter by the links targets.

// common interaction targets
interaction.content any "coke, coca-cola, pepsi, 7-up, soda"
OR interaction.title any "coke, coca-cola, pepsi, 7-up, soda"
OR interaction.hashtags in "coke, coca-cola, pepsi, 7-up, soda"

// targets available from the links augmentation
OR links.title any "coke, coca-cola, pepsi, 7-up, soda"
OR links.meta.description any "coke, coca-cola, pepsi, 7-up, soda"
OR links.meta.keywords in "coke, coca-cola, pepsi, 7-up, soda"

This filter inspects common interaction targets which include content, title and hashtags. It also makes use of targets from the Links augmentation to find content that contains links to pages which contain the terms. Notice that the conditions are combined through the logical OR operator so that if any of the conditions are met by an interaction then that interaction is returned.