Boolean Basics: Curating powerful queries which do the work for you

Media monitoring can often feel like pulling needles from a haystack: thousands of new stories emerge daily, making it difficult to quickly and accurately sort irrelevant mentions from breaking news. Boolean operators like AND, OR, NOT are perfect for building precise, complex queries to make sure you get exactly what you’re searching for.

Putting together complex queries may seem like a headache but it’s surprisingly easy to reap the benefits that come hand-in-hand with specific, targeted queries. A well-written query will produce accurate, relevant data, which gives you better insights, helps you to make smarter decisions and will ultimately strengthen your business.

Screen Shot 2017-03-07 at 4.32.53 pm

At Streem we are focused on enhancing flexibility, and this flexibility begins with your search terms. Creating personalised Boolean queries means you can get the exact data you want whilst having the flexibility to change these as the news agenda evolves. So let’s get started:

1. AND

“AND” requires the media item to contain both sets of terms that AND refers to e.g. Chocolate AND Milk will find news that mentions both Chocolate and Milk. An article that says ‘I love Chocolate and Milk’ will be found with this query. Remember that AND must be capitalised.

2. OR

“OR” requires the media item to contain either of two terms e.g. Chocolate OR Milk will find web sites that mention either Chocolate or Milk (a much broader search than the “AND” operator). A media item that says ‘I just went shopping and bought some Milk, bananas, etc’ will be found with this query.

You can also use OR to include variations in the way that brands can be referred to or any common spelling mistakes for brand names e.g (Macdonalds OR Macdonald’s OR MacDonalds OR Maccas or Maccy D’s or MacDs).

3. NOT

You can easily remove unwanted keywords from your search by typing in “NOT”. “Chocolate Milk” NOT Strawberry will find web sites that mention “Chocolate Milk” but not strawberry. As with AND and OR, NOT has to be capitalised.

Most Queries will require some form of exclusions, whether these be irrelevant authors or mentions, or if there are certain types of mentions about the brand you’re just not interested in.

Boolean_Generic_20151028-014. ( Parentheses )

Parentheses are used to group terms together, so that operators like AND and OR can be applied to all the terms in the brackets, e.g., “Chocolate Milk” AND (Icecream OR “ice cream” OR confectionary) will find results with phrases like “Chocolate Milk flavoured icecream” or “Chocolate milk flavoured confectionary”.

5. “Double quotes”

Double quotes finds media items where the text in the quotation marks appears in that order without any other words in the middle. For example, searching for “chocolate milk” will find a site that says ‘I love chocolate milk’ and ignore sites that mention just chocolate or just milk.

Screen Shot 2017-03-07 at 4.35.44 pm

Common mistakes to avoid

Curating queries for frequently mentioned brands or ambiguous issues can be a difficult undertaking – misuse of operators or improper testing can lead to irrelevant results, or worse, may exclude relevant results. So we’ve included some common mistakes to avoid when writing queries:

  1. Not capitalising ‘NOT’, ‘AND’, ‘OR’, etc.
  2. Forgetting to use include quotation marks for phrases, e.g. ‘Chocolate Milk” OR Choc Milk should be “Chocolate Milk” OR “Choc Milk”
  3. Forgetting to close brackets
  4. Avoid syntax errors: Even when the query is complicated, it is usually best to work off a simple structure made up of 3 parts:

[Main term] AND [context terms] NOT [excluded terms]

Happy Booleaning! Remember, if you run into any trouble, your dedicated Streem Account manager can curate bespoke boolean queries for you.