Boolean Queries for Media Monitoring: A Complete Guide with Examples (2026)

A technical guide to boolean queries: AND, OR, NOT operators, how to apply them through three keyword fields in Qola, five sources of noise in Indonesian news, six steps to build a query, and example settings for PR.

Qola cover: dark editor window with a boolean query for road damage news using AND, OR, NOT operators, and a filtering result card: 10,305 matched, 8,775 unique, 2,254 relevant.

A boolean query is a way of writing monitoring keywords with AND, OR, NOT, quotation marks, and brackets so that results contain only the news that is actually relevant. Without a well-built query, most results can be noise: in Qola data, of 10,305 Indonesian news articles matched by the keywords "kondisi jalan" (road condition) and "kerusakan jalan" (road damage) in October 2026, only 2,254 (21.9%) were actually about damaged roads. This guide explains the operators, the noise typical of Indonesian-language news, and six steps to build a query you can test. Every example is also written in Qola format, using the three fields of the keyword form: Kata Kunci (Keyword), Kata kunci yang diperlukan (Required keywords), and Kata kunci yang dikecualikan (Excluded keywords). Qola's dashboard interface is in Indonesian, so the field names are given as they appear.

Key takeaways:

  • Common keywords catch too much. Only 21.9% of 10,305 articles matched by road keywords were actually about road damage.
  • Duplicates make up almost 15% of raw results. 1,530 articles were the same headline in the same outlet, or had no headline.
  • Indonesian has its own kind of noise. Figurative phrases such as "jalan tengah" (middle way) and "turun ke jalan" (take to the streets) need to be excluded with NOT.
  • In Qola, a boolean query takes three fields. Kata Kunci works like OR, Kata kunci yang diperlukan like AND, and Kata kunci yang dikecualikan like NOT.
  • A good query is always tested. Take a sample of results, count how many are relevant, refine, and repeat.

What is a boolean query?

A boolean query combines keywords with logical operators. The name comes from Boolean algebra, but using it is simple. The five elements below cover almost every PR need:

Element

Function

Example

Result

Quotation marks

The phrase must appear exactly and in order

"jalan rusak"

Does not match "a village road that is not damaged"

OR

Either one is enough

amblas OR ambles

Matches both spellings of "collapsed"

AND

Both sides are required

"jalan rusak" AND Garut

Only road damage news that mentions Garut

NOT

Drop articles containing this term

jalan NOT "jalan tengah"

Removes the figurative meaning

Brackets

Group synonyms

("jalan rusak" OR "jalan berlubang") AND Garut

Garut applies to both phrases

Qola diagram: anatomy of the boolean query ("jalan rusak" OR "jalan berlubang") AND Garut NOT "jalan tengah", explaining quotation marks, OR, brackets, AND, and NOT.

Operator syntax differs between tools. Some use a minus sign for NOT, some use AND NOT, and some support proximity operators such as NEAR. The logic is the same, so this guide uses the most common form. The term is also in the Qola glossary.

A boolean query in Qola format

In Qola you do not type operators. The same logic is entered through three fields in the keyword form of each project:

Qola diagram: a boolean query for damaged roads in Garut entered into the three fields of the Qola keyword form: Keyword (OR), Required keywords (AND), and Excluded keywords (NOT).

Field in Qola

Equivalent to

How to fill it

Kata Kunci (Keyword)

OR

Add each synonym as a separate keyword in one project; results from all keywords are combined

Kata kunci yang diperlukan (Required keywords)

AND

A word or phrase that must also appear in the headline or body, such as a place name

Kata kunci yang dikecualikan (Excluded keywords)

NOT

Phrases that cause an article to be dropped if they appear; separate with commas, not case-sensitive

For example, the query ("jalan rusak" OR "jalan berlubang") AND Garut NOT ("jalan tengah" OR "turun ke jalan") is entered as two keywords, "jalan rusak" and "jalan berlubang". Each gets Garut in the Kata kunci yang diperlukan field and "jalan tengah, turun ke jalan" in the Kata kunci yang dikecualikan field. Brackets are not needed, because each keyword carries its own conditions and exclusions.

Why keywords alone are not enough

For the October 2026 road damage news report, Qola used two keywords that look clear: "kondisi jalan" and "kerusakan jalan". The raw result was 10,305 online articles in 28 days. After three filtering stages, 2,254 remained.

Qola chart: three filtering stages for road damage news, October 2026; 10,305 matched the keywords, 8,775 after removing duplicates, 2,254 relevant (21.9%).

Stage

Articles

Removed

Share of raw results

Matched the keywords

10,305

-

100%

After removing duplicates and untitled articles

8,775

1,530

85.2%

Actually about damaged roads

2,254

6,521

21.9%

Key finding: after duplicates were removed, only 25.7% of articles were relevant. Three in four of the remaining articles did not pass the relevance filter.

How to read this data: this number is not a measure of a monitoring tool's quality but a picture of how broad common keywords are. Road phrases appear in political news, foreign news, and even car reviews. A report that counted all 10,305 articles would overstate the issue almost five times, and its sentiment chart would be wrong too.

Five sources of noise in Indonesian-language news

The filter used for the road damage data includes an exclusion list. Each line was added because the pattern actually appeared in the results. The patterns fall into five groups.

01 Figurative meaning

The word "jalan" (road, way) is often figurative: "jalan tengah" (middle way), "jalan damai" (peaceful path), "jalan keluar" (way out), "jalan sendiri" (go it alone), or "membuka jalan bagi" (pave the way for). Political and economic news is full of these phrases. How to handle it: exclude the figurative phrases, not the word "jalan" itself. In Qola, enter them in the Kata kunci yang dikecualikan field.

02 The road as a place, not the subject

"Turun ke jalan" (take to the streets) and "blokir jalan" (block the road) usually describe protests. The road is mentioned, but the story is about the action. How to handle it: exclude protest phrases if your issue is the physical condition of roads. If your issue is protests, reverse the logic: the protest phrases become the Kata Kunci.

03 Foreign news

Indonesian keywords still match translated foreign news, for example stories from Vietnam, Europe, or the Middle East. How to handle it: exclude frequently appearing country and city names, or enter an Indonesian place name in the Kata kunci yang diperlukan field.

04 Car reviews and listings

Car reviews and used car stories often include phrases about roads, for example when discussing ride comfort. How to handle it: exclude vehicle brands, terms such as SUV, and the phrase "mobil bekas" (used car) in the Kata kunci yang dikecualikan field.

05 Mentioning a road without discussing damage

This is the hardest group to filter. An article mentions a road, but no word signals damage or repair. How to handle it: use phrases that already contain the condition as the Kata Kunci, such as "jalan rusak" (damaged road) and "jalan berlubang" (potholed road), not a broad phrase such as "kondisi jalan" (road condition). For data analysis, the proximity technique in the advanced techniques section filters the rest.

Six steps to build a boolean query

01 Write the monitoring question in one sentence

Before writing keywords, write what you want to know, for example "news about damaged roads in Garut Regency and the local government's response". Common mistake: writing the agency name right away without knowing which issue you are looking for, so every ceremonial story comes in. How to do it: split the sentence into three parts: object (road), condition (damaged, potholed), and context (Garut).

02 Collect synonyms and spellings

Journalists use many words for the same thing. For road damage alone, Indonesian news uses rusak, berlubang, amblas, ambles, ambrol, retak, bergelombang, and longsor. Common mistake: using only the agency's official terms, while the media uses everyday language. How to do it: read 20 to 30 real headlines about your issue, note every word used, and add each one as a Kata Kunci in one project.

03 Add context with AND

Context keeps results focused: a place name, road segment, program name, or agency name with its abbreviation. Common mistake: context that is too narrow, such as only a sub-district name, so articles that mention the regency are missed. How to do it: choose the most common name that already covers the variations. For example, "Garut" already covers "Kabupaten Garut" (Garut Regency). In Qola, enter it in the Kata kunci yang diperlukan field.

04 Add exclusions from real samples

Good exclusions come from results, not guesses. Common mistake: using NOT too aggressively, for example NOT politics, which also removes news about a regional council member pressing for road repairs. That kind of news is highly relevant to PR. How to do it: exclude specific phrases ("jalan tengah"), not general words ("politics"). In Qola, these go in the Kata kunci yang dikecualikan field, separated by commas.

05 Test on a sample and calculate precision

Take 50 to 100 results at random, mark which are relevant, and calculate precision:

Measure

Formula

Meaning

Precision

relevant articles in the sample ÷ sample size × 100%

How clean the results are

Recall

relevant articles captured ÷ all relevant articles you know of × 100%

How little is missed

Common mistake: chasing precision only. A query that is too strict looks clean but misses important news. How to do it: for recall, prepare 10 relevant articles you already know about and check whether all of them are captured.

06 Review regularly

Issues shift, officials change, and new terms appear. How to do it: repeat the sample test every month, or whenever a chart spikes for no clear reason. In Qola, the daily trend by sentiment for each keyword helps show when the pattern of results changes. How to read spikes is explained in the guide to reading news spikes.

Advanced techniques: proximity, duplicates, and headlines

These three techniques were used when processing the road damage data above, after the articles were collected. They are useful if you analyze exported results yourself:

Technique

Rule used

Problem solved

Proximity

A road word (jalan, ruas, jembatan, akses, jalur) must be followed by a damage word within 60 characters without a full stop, or the reverse within 40 characters

Articles that mention a road and damage in different sentences about different things

Headline first

Patterns are matched in the headline; the summary is used only if the headline also contains a road word

Long articles that mention a road in a single paragraph

Remove duplicates

The same headline in the same outlet is counted once

Articles that are updated or indexed twice

One thing is deliberately not removed: the same headline in different outlets. A press release or news agency story republished by many outlets is a signal of reach. How to measure it is in the guide to measuring press release reach.

Is the query too loose or too strict? Know the symptoms

Query problems usually show up in the results before they show up in the numbers. Use this table when reviewing results each week:

Symptom in results

Likely cause

Fix

Many unrelated political or economic stories

The keyword is used figuratively

Add the figurative phrases that appear to Kata kunci yang dikecualikan

Foreign news comes in

No place context

Enter a place name in Kata kunci yang diperlukan, or exclude frequently appearing countries

The chart spikes, but the content is the same headline repeated

Duplicates not removed

Count the same headline in the same outlet once

Important news you know about is missing

Too few synonyms or NOT too broad

Add synonyms as new Kata Kunci entries, narrow exclusions to phrases

Very few results while the issue is busy

Conditions too strict or context too narrow

Replace the Kata kunci yang diperlukan entry with a more general name

Example keyword settings for PR needs

Replace the text in square brackets with the names you monitor. Start from these examples, then refine them with steps 04 and 05.

Need

Kata Kunci (Keyword)

Kata kunci yang diperlukan (Required)

Kata kunci yang dikecualikan (Excluded)

Agency name

[full agency name]; [abbreviation]

For the abbreviation: [region or parent ministry]

[other meaning of the abbreviation]

Leader

[leader's name]

[position]

[other public figure with a similar name]

Program

[official program name]; [popular program name]

[agency name]

-

Sector issue by region

jalan rusak; jalan berlubang; jalan amblas

[regency name]

jalan tengah, turun ke jalan, mobil bekas

National sector issue

jalan rusak; jalan berlubang; jalan amblas

-

jalan tengah, turun ke jalan, vietnam, mobil bekas

A semicolon in the Keyword column means separate keywords. A leader keyword must have a position in the required field, because personal names almost always have namesakes. Agency abbreviations need context and exclusions, because they often match other abbreviations.

What this means for PR teams

  1. Do not report raw numbers. Before a number goes into a report for leadership, make sure duplicates and noise have been removed. In the data above, the raw count was almost five times the real one.
  2. Keep the query as a working document. Record the version, date of change, and reason for each exclusion so this month's results can be compared with last month's.
  3. Test the query before big issues. The rainy season, the holiday exodus, and the end of the fiscal year bring new terms. Test a sample before the busy period, not once a crisis is underway.

About this data

The data comes from Qola internal project keywords "kondisi jalan" and "kerusakan jalan", online news only, 1 to 28 October 2026 (Western Indonesia Time). Duplicates are defined by a normalized headline and the same outlet. Relevance is determined by a text-pattern filter on headlines and summaries, as described above, not by manual review of each article. The relevant count is therefore a filter result, and a small number of articles may be wrongly included or excluded.

FAQ

What is a boolean query in media monitoring?

A boolean query is a set of keywords with AND, OR, NOT, quotation marks, and brackets that decides which articles enter the monitoring results. The goal is to capture all relevant news and remove what is not.

What is the difference between AND and OR?

AND requires both terms to appear in the same article, so results are narrower. OR needs only one of them, so results are broader. OR is usually used for synonyms inside brackets, and AND to add context.

How many NOT exclusions are reasonable?

There is no fixed limit. What matters is that every exclusion comes from real noise in the results and is a specific phrase. NOT with a general word risks removing important news.

How do I know a query is good enough?

Take 50 to 100 random results and count the relevant share (precision), then check whether 10 relevant articles you already know about are captured (recall). If both are high, the query is ready for reporting.

Does Qola support boolean queries?

Yes, through three fields in the keyword form. Kata Kunci works like OR, Kata kunci yang diperlukan like AND, and Kata kunci yang dikecualikan like NOT. Nested brackets and proximity operators are not typed directly; synonyms are simply added as separate keywords in one project. See Qola's monitoring features.