Sample queries and common mistakes

In this article I would like to discuss the trickiest function in Awario, nevertheless the most effective — Boolean Search. It is a manual type of search that allows users to combine keywords with Boolean operators to create more specific search queries and get more relevant results.

In our knowledgebase we already have a training on Boolean Search operators (impt. I would highly recommend looking through it before proceeding).

I have prepared for your some case studies with step-by-step instructions, so let’s start with the first one.

Find conversations about a topic that don't mention your brand

This example contains the basics to demonstrate how to configure a search query in Boolean Search, which operators to use and the way to filter out mentions with the help of negative keywords.

Keywords: sneakers, jogging shoes, running shoes, training shoes
Negative keyword : Adidas
Sources: Facebook, Twitter

1. Sneakers — a simple one-word keyword, which we add as it is:

example1_1 sneakers

2. "jogging shoes", "running shoes", "training shoes" — keywords that consist of two (or more) keywords, so we should use them with the + and " " operators (" " are used to search for a specific word combination. But this operator allows digits and punctuation marks between words within a keyword. And if we add +, Awario won’t allow any characters between words and search for 100% exact match). As we're looking for either of these keywords, we also need to put OR between them:

example1_2 sneakers OR +"jogging shoes" OR +"running shoes" OR +"training shoes"

3. Ok, now we should add our negative keyword to exclude documents that also contain Adidas. For this purpose I will use the AND NOT operator. In addition to that, I would also put all our keywords in brackets to group them together, so that AND NOT can be applied to all the terms in the brackets. Sources can be added byusing the FROM operator:

example1_3_2 (sneakers OR +"jogging shoes" OR +"running shoes" OR +"training shoes") AND NOT Adidas

That’s been quite easy, hasn’t it? Let’s move forward and raise the bar.

Get mentions from different sources for separate keyword groups

Now I will modify this query and try to get mentions for "sneakers" from Twitter and for "jogging shoes, running shoes, training shoes" from Facebook.

Keyword: sneakers
Negative keyword: Adidas
Source: Twitter

Keywords: jogging shoes, running shoes, training shoes
Negative keywords: Adidas
Source: Facebook

If you’ve noticed, I made a tip in our conditions and divided keywords into groups with their own parameters.

1. I start from creating a query for the first group absolutely the same way as described in the previous example:

example2_1 sneakers AND NOT Adidas FROM twitter

2. The first group is ready and I add the UNION operator which is used to include a group of different keywords that should come from two different sources in one search. The second query with its own operators follows UNION

example2_3 sneakers AND NOT Adidas FROM twitter UNION (+"jogging shoes" OR +"running shoes" OR +"training shoes")

3. After that we complete the query by adding the negative keyword and the source for the second group:

example2_4 sneakers AND NOT Adidas FROM twitter UNION (+"jogging shoes" OR +"running shoes" OR +"training shoes") AND NOT Adidas FROM facebook

Add several negative keywords for a group of keywords

Adding multiple negative keywords to the group of keywords is also possible with Boolean.

Keywords: CAT, cat equipment, cat shoes
Negative keywords: animal, pur, fur, kitty

And it is pretty simple, so you should just specify a group of keywords.

example3_1 (++"CAT" OR +"cat equipment" OR +"cat shoes")

Pay attention to the keyword “CAT”. As you can see all the letters in this keyword are upper-case. And for the case-sensitive exact data search, we should use the ++" " operator.

Next, we should add AND NOT

example3_2 (++"CAT" OR +"cat equipment" OR +"cat shoes") AND NOT

And finally, add a group of negative keywords

example3_3 (++"CAT" OR +"cat equipment" OR +"cat shoes") AND NOT (animal OR pur OR fur OR kitty)