Sub topic 4
Writing Boolean searches that find the right coverage
A Boolean search is a query built from keywords and logical operators. Media monitoring platforms such as Meltwater and Cision use it to decide which articles, broadcasts and posts count as coverage of your brand. A weak query gives you a report full of irrelevant mentions, or one that misses the stories that matter. This chapter covers how queries are built, how to test them, and the errors that cause most bad results.
This chapter assumes you know your monitoring goals (covered earlier in the tutorial), that you can name the coverage sources your platform indexes, and that you have used a search box with quotation marks before.
The working model
A query is a set of rules that a document either satisfies or doesn't. The platform checks every indexed item against those rules and returns the matches. You control two qualities of the result:
- Recall is the share of relevant coverage that your query finds. A query with low recall misses stories.
- Precision is the share of returned results that are relevant. A query with low precision returns noise.
Widening a query usually raises recall and lowers precision. Narrowing does the reverse. Your job is to find a balance that suits the goal. A crisis watch favours recall, because missing a story is costly. A monthly board report favours precision, because every irrelevant row weakens the analysis.
Core operators
| Operator | Meaning | Typical use |
|---|---|---|
| `"quoted phrase"` | Exact phrase, words adjacent and in order | `"Acme Corporation"` |
| `OR` | Either term matches | Brand name variants |
| `AND` | Both terms must appear | Brand plus an event word |
| `NOT` | Excludes items containing the term | Removing false positives |
| `( )` | Groups terms and sets evaluation order | Combining OR groups with AND |
| `*` wildcard | Matches word endings or characters | `launch*` finds launch, launches, launched |
| Proximity (such as `NEAR/5`) | Terms within a set number of words | Spokesperson name near brand name |
Operator names, wildcard rules and proximity syntax differ between platforms. Some require operators in capitals. Some treat a space between words as AND, and others treat it as a phrase. Check the documentation for your platform before you rely on a pattern from another one.
Building a query in three layers
Think of a query as three layers, each with one job.
- Entity layer. Every name the target goes by, joined with OR.
- Context layer. Optional words that must also appear, joined with AND, which narrow the results to the topics you care about.
- Exclusion layer. Known false positives, joined with NOT.
Here is the generic example from the plan:
("Acme Corp" OR "Acme Corporation" OR AcmeApp)
AND (launch OR recall OR outage OR lawsuit)
NOT ("Acme Street" OR "Acme Awards")The first line lists three ways people refer to the company. The second line keeps only stories that mention one of four event words. The third line removes two things that share the name but have nothing to do with the company.
Parentheses decide the meaning
Platforms differ in how they rank operators when no brackets are present. A query that works in one tool can return different results in another. Always use parentheses to make the order explicit.
Compare these two queries:
Acme OR AcmeApp AND outage(Acme OR AcmeApp) AND outageIf AND is evaluated before OR, the first query means "Acme, or AcmeApp together with outage". That returns every story mentioning Acme, whether or not it involves an outage. The second query means what the writer almost certainly intended. Brackets remove the ambiguity.
Choosing entity terms
The entity layer determines recall, so spend time on it. List:
- The full legal name, the common short name and any abbreviation.
- Product and campaign names, which often appear in headlines without the company name.
- Common misspellings and alternate spellings, such as "Acme Corp." with a full stop.
- Executive and spokesperson names, in quotation marks, ideally paired with the brand using proximity.
- Hashtags and handles, if social sources are in scope.
Ambiguous names need extra care. If your brand is "Apex", the bare word will match countless unrelated items. Pair it with a context word, require proximity to an industry term, or restrict the search to a language, region or source type, if your platform supports those filters.
Wildcards and their risks
Wildcards raise recall cheaply, but they can pull in unrelated words. launch* is safe. act* also matches action, actor and actually. Use the longest stem that still covers the variants you need, and test the results. Many platforms already match some plurals automatically, so check whether stemming is on before adding wildcards.
Searching specific fields
Most platforms let you limit a term to a field such as headline or lead paragraph. A brand in the headline is usually a main subject of the story. A brand in the ninth paragraph may be a passing mention. For a "top stories" report, a headline-restricted query gives high precision. For crisis monitoring, search the full text, so that you don't miss stories that mention you only in the body.
Test and refine the query
Do not save a query on the first draft. Work through a short loop:
- Run the query over a fixed period, such as the last 30 days.
- Read a sample of results, 30 to 50 items, and mark each as relevant or not.
- For every irrelevant item, find the cause. Add a NOT term, or tighten the context.
- Search separately for stories you know exist, such as a recent press release pickup. If the query misses them, widen the entity layer.
- Record the version and the date, so changes are traceable.
Common errors
- Missing parentheses. An OR leaks across the whole query, and results balloon.
- Over-specific context. Requiring "recall" AND "safety" AND "voluntary" misses stories that use other wording.
- Unquoted multi-word names. Without quotes, some platforms match the words anywhere in the document, not side by side.
- Forgotten variants. Hyphens, ampersands and accents can change how a name is indexed.
- Competitor terms inside the brand query. Keep the brand and each competitor in separate queries, or tag them separately, so that share of voice later is calculated correctly.
- One query for every purpose. A crisis watch, a weekly report and a competitor tracker need different precision targets, so write separate queries.
A worked refinement
Suppose a first draft returns 400 results for the month, and your sample shows many about a street called Acme Street and a regional awards show. You add those two phrases to the NOT block. The sample also reveals that stories about the product "AcmeApp" are missing because they never mention the company name, so you add AcmeApp to the entity layer. A rerun gives 310 results, and 46 of 50 sampled items are relevant. That is 92% precision in the sample, which is acceptable for a monthly report. For a crisis query you might loosen the context layer to accept the extra noise.
Exercise
A query reads: Globex OR GlobexPay AND outage. A colleague says it returns far too many stories. What is the likely cause, and how would you fix it?
Show answer
Without parentheses, AND may be evaluated before OR, so the query means "Globex, or GlobexPay together with outage". Every Globex story matches, with or without an outage. Fix it by grouping the OR terms: (Globex OR GlobexPay) AND outage. Then test a sample of results.
Exercise
Your brand name is also a common English word and your query has 20% precision in a sample of 50 results. Name two changes you could try, and say which direction each moves recall and precision.
Show answer
Add a context layer, for example AND with industry terms, or use proximity to a product or executive name. This raises precision and may lower recall. Add specific NOT phrases for the main false positives you found, which also raises precision but can remove some good items. A third option is restricting the query to headlines, which raises precision and lowers recall.