1. Knowledge Base
  2. Everything Boolean

Advanced Guide to Boolean Searches

There's more to Boolean that just AND, OR, and NOT!

Boolean queries allow you to define the content that you'd like to see within an alert. The most used search operators are AND, OR, and NOT but they are not the only ones available to you.

Below is a complete list of all the search operators that you can use when building queries in PeakMetrics.

  1. Start by creating a Workspace
  2. Toggle to Query to create your Boolean query
  3. Add Source selections 
 

Operator

Action 

Example 

Result

AND

Narrows your search by retrieving mentions where both terms are present. AND must be capitalized.

"agriculture" AND "regenerative"

Any document where "agriculture" and "regenerative" are both included. 

OR 

Retrieve mentions to contain at least one search term. OR must be capitalized.

"agriculture" OR "regenerative"

Either "agriculture" or "regenerative" must appear in the document.

NOT

Excludes mentions of unwanted terms. Must be capitalized.

"agriculture" NOT "regenerative"

Any document that mentions "agriculture" and does not mention "regenerative".

GROUPING

Multiple terms or clauses can be grouped together with parentheses, to form sub-queries.

("agriculture" OR "farming") AND "regenerative"

Either agriculture or farming are present and regenerative is always present.

LANGUAGE

Matches documents without specified language. 

AND
(language:"english" OR language:"en"))

Any document that was created in English, or not in English.

PROXIMITY

We use proximity as a replacement for the AND function. The proximity helps increase likelihood that the two terms are being spoken in context of each other. 

"Regenerative agriculture"~10

Returns results with Regenerative and Agriculture within at most 10 words apart from each other. The phrase "regenerative agriculture" would be considered more relevant than "regenerative farming, grassland, and agriculture". Pro Tip - try ~5, ~7, and ~10 on your query and see how the volume and relevance of results change!

MULTI-NEAR

Multi-near matches multiple keywords or phrases within so many words of another keyword of phrase.

("legislation") near/5 ("agriculture" OR "farming")

Returns documents  that contain "legislation" within 5 words of either "agriculture" or "farming"

TRUNCATION

Use this when you are looking for one or more different keywords in a document.

Legisl*

Matches documents that have the keywords legislate, legislation, or legislative. 

FUZZINESS

Matches words that are similar to the word that you are looking to track. 

Agriculture~

Returns documents that mention Agriculture spelled incorrectly, or in different languages. 

UNKNOWN LETTER / SYMBOL

Use this operator when more than one symbol could be used in a keyword. 

Advis?r

Returns documents that mention Advisor or Adviser. 

SENTIMENT

Matches documents with provided sentiment. Supported values: between -1 and 1 on a decimal scale.

"agriculture" AND sentiment.polarity:[* TO -.1]

Returns any document mentioning agriculture that has a negative sentiment. 

SOCIAL ENGAGEMENT

Matches news documents and Tweets when the number of Facebook shares or Twitter retweets is equal, greater or smaller than the provided value.

"agriculture" AND socialcount_last:[10 TO 999]

Returns any news document about agriculture that has been shared between 10 and 999 times over Twitter or Reddit. 

CASE SENSITIVITY

Pulls content based on case sensitivity.

text.case_sensitive:AGRICULTURE

Returns documents where agriculture returns in only capital letters.

TWITTER LIST

Pulls content based on specified Twitter list

AND twitter_list: 34179516

Returns tweets from specified twitter lists only. Input the Twitter URL to the query to generate your results. 

TWITTER HANDLE

Matches documents by a specific author or username.

AND Author:RegenerativeAg

Returns documents from the Twitter handle

@Regenerative Ag

TITLE

Matches documents that have the specified word / phrase in the title. 

AND title:"Regenerative Agriculture"

Any document that has “Regenerative Agriculture” in its title. 

TWITTER FOLLOWERS

Matches Twitter documents from handles that have a number of followers within a given range.

AND user.followers:[1000 TO 10,000]

Matches documents from Twitter handles with between 1,000 and 10,000 followers. 

SUBREDDIT

Matches Reddit documents from a specific Subreddit.

AND subreddit:sustainability

Returns Reddit documents from the Subreddit “r/sustainability”

DE - DUPLICATION

Removes duplicated news sites

AND (is_original_title:true OR NOT canonical:*)

Returns the original article / link