Skip to main content

Using Boolean Operators in News Search

Guide for crafting a Boolean query for a News Search

Constructing a proper query ensures relevant, insightful results on a topic of interest.

To create a Boolean search on news data, navigate to the News Search anding page:

The Basics

Boolean query is a type of search allowing you to combine keywords or phrases with operators such as AND, AND NOT and OR to further produce more relevant results. While the operators do not need to be capitalized, we recommend using capitals for your operators to differentiate between those and the key terms in your search.

Please note: Query terms are not case sensitive, so a search of "united states" will also return results that contain "United States".

Available Operators

Boolean search in Primer Analyze utilizes the following operators:

Examples

AND

Query: primer AND technologies

Output: captures documents in which the words ‘primer’ and ‘technologies’ occur at least once.

Query primer technologies

Output: this query will utilize an “implied AND” and will capture documents in which the words ‘primer’ and ‘technologies’ occur at least once.

OR

Query: primer AND (technology OR “artificial intelligence” OR “machine learning)

Output: captures documents contain the word ‘primer’ and at least one mention of either technology, artificial intelligence, or machine learning.

AND NOT

Query: primer AND NOT (paint OR painting)

Output: captures documents that contain the word ‘primer’ but do not contain the words paint or painting

QUOTATION MARKS

Query: “primer technologies”

Output: captures documents that contain both words consecutively; will not capture a document with the following sentence, “The company Primer makes many useful technologies.”

Please note: Do not use quotation marks in conjunction with a title: search, ex: title:"Artificial Intelligence". For a title: search, put multiple terms in parentheses, ex: title:(artificial intelligence)

PROXIMITY OPERATOR

Query: “primer artificial intelligence”~7

Output: captures documents in which the search terms primer, artificial and intelligence all occur within 7 words of each other. Please note that the search terms need to occur between quotation marks.

Pro tip: You can include "tagged entities" in the proximity operator search, so a search of the below will include all results of "united states", "United States", US", "USA", etc., combined with mentions of Russia:

Please note: The proximity operator cannot be used in conjunction with the title search functionality.

SEARCH ON DOCUMENT TITLE

Query: title:robotics

Output: captures documents in which robotics appear in the headline of the document.

Query: title:(artificial intelligence) AND robotics

Output: captures documents in which artificial intelligence appears in the headline of the document and robotics appears in the body of the document. Please note that to search for multiple words or to utilize a Boolean expression within a title, utilize parentheses ( ), ex: title:(artificial intelligence).

Please note: In the example above, the words artificial and intelligence can appear anywhere within the title of the document, not necessarily directly next to each other.

Query: (title:(AI OR ML) AND robotics)

Output: captures documents in which AI OR ML appear in the headline of the document, along with the word robotics anywhere within the document. Please note that all words you would like to appear in the title of the document should occur between parentheses ( ), after the colon in title:

Please note: Tagged entities do not work in combination with the document title search capability. For example this search will not complete:

but this one will:

Please Note:

  • The title: operator only works when utilizing a lowercase t (title:) and not an uppercase T (Title:)

  • Exact phrase search isn't available in a title search. For example title:("state department") won't return the expected results. To search for multiple words within a title search, put them in parentheses, ex: title:(state department)

  • The proximity operator does not work with a title search at this time.

WILDCARD

Query: cyber*

Output: captures documents that contain cybersecurity, cyberpunk, cybernetics, etc.

Please Note:

  • Wildcards can be used in a title search, ex: title:(state department*)

  • Wildcards cannot be used in an exact phrase, ex: "state department*"

  • Wildcards cannot be used with a proximity operator, ex: "state department*"~7

  • Wildcards must be used at the end of words, and not the beginning

Things to Know:

  • Use parentheses as you would in math class. The boolean operator in front of a parenthetical cluster will apply to all of the terms within the parentheses.

  • Primer uses an analyzer which can lemmatize and stem words to find common roots, so a search on: policy will return results of both “policy” and “policies”, for example.

  • Alternate spellings - a query should include alternate /spellings for words as necessary:

    • (organization OR organisation)

    • (muhammad OR mohammad)

  • To search on terms that include apostrophes, put the single word in quotation marks:

    • “Sean’s”

  • Utilize the entities (people, organizations, and locations) in the dropdown menu whenever they are presented. Selecting “United States” from the dropdown menu will ensure a search returns results for “united states” as well as “U.S.A”, “U.S.” and “America”

Please reach out to our Customer Success team at [email protected] for additional support with search strategies and boolean tips.

Did this answer your question?