Boolean queries allow you to define precisely what you are looking for in a search. The most used search operators are AND, OR, and AND NOT but they are not the only ones available to you.
Below is a complete list of all the search operators you can use when building queries.
We've organized each Boolean operator into categories. Click on a category to jump to its section.
- Common Operators
- Source Operators
- Proximity Operators
- Social Media Operators
- Complex Operators
- Appendix
_____________________________________________________________________
Common Operators
Search | Action | Example | Result |
AND | Narrows your search by retrieving mentions where all search terms are present. | atlantic AND “sailboat racing” | Any document where “Atlantic” and “sailboat racing” are both included. |
OR | Expands your search to retrieve mentions containing at least one search term. | sailing OR sailboat | Either the term before or the term after “OR” must appear in the document. |
NOT | Excludes mentions containing an unwanted term. | sailboat NOT race | Any document where “race” does not pull in as a result. |
AND/OR | Use this when you need a keyword to pull results alongside one or more other keywords. | sailboat AND ( racing OR race ) | Any document where “sailboat” and either “racing” or “race” are present. |
ASTERISK | Use this when you are looking for one or more different keywords in a document. | sail * | Matches documents that have the keywords sail, sailing, sailboat, etc. |
SENTIMENT | Matches documents with provided sentiment. Supported values: positive, neutral, negative, and not rated. | sentiment:" positive " | Any document that has been assigned positive sentiment. |
COUNTRY | Matches documents created in the specified country. Must use the 2-letter codes to specify the country. |
country:" us " |
Any document that was created by a source in the US. |
LANGUAGE | Matches documents that have a specified language. Must use the 2-letter code to specify language, with the exception of Chinese (“zh-hans” or “zh-hant”). Must use lowercase. |
language:" es " |
Any document that was created in Spanish. |
TITLE | Matches documents that have the specified word/phrase in the title. |
title:"Sailing the World" |
Any document that has “Sailing the World” in its title. |
COLON | The colon is a character used in Boolean expressions. We see it used many times in this library. If you wish to use a colon in your keywords then you must use it in quotations so that the system doesn't think it's a Boolean expression, e.g. stock symbols. | " Euronext:ROTH " | Any document that contains "Euronext:ROTH". |
CONTENT | Matches documents that have the specified word/phrase in the body. |
content:" George Mendonsa" |
Any document that has “George Mendonsa” in the body. |
_____________________________________________________________________
Source Operators
Search |
Action |
Example |
Result |
SOURCE |
Find all documents from a particular source. |
sourceName:"Washington Post" |
Returns documents from the source named Washington Post
|
URL |
Matches documents from a specific URL. |
URL:" https://www.elitedaily. |
Returns documents from |
LINK |
Matches documents that have specified link in document body. |
link:" https://t.co/tndg9jSukj" |
Returns documents that |
AUTHOR |
Matches documents by a |
author:" Yachting World" |
Returns documents from |
DATA SOURCE |
Matches documents from a specific data source. Source must be lowercase. See appendix for full list. |
metaData.source.informationType:"news" AND sailing |
Returns News documents with the term "sailing". |
_____________________________________________________________________
Proximity Operators
Search |
Action |
Example |
Result |
NEAR |
Retrieve results for two words in close proximity with each other. |
sailboat NEAR racing |
Any document where the “sailboat” and “racing” are within 4 words of each other. |
NEAR/N |
Retrieve results within a specific distance of one another. The number used determines the distance. |
sailboat NEAR/10 racing |
Any document where the keywords “sailboat” and “racing” are within 10 words of each other. |
ONEAR |
Use this when you’d like a document to have two words in close proximity to one another and in the same order. |
sailboat ONEAR racing |
Any document where “sailboat” is followed by “racing” within 4 words. |
ONEAR/N |
Use this when keywords need to be within a specific distance of one another and in the same order |
sailboat ONEAR/10 racing |
Any document where “sailboat” is followed by “racing” within 10 words. |
WORD FREQUENCY |
Use this when you need a keyword to occur a number of times. |
Sailboat {5} OR race {4,10} OR ocean {3, } OR cup {,2} |
|
INGRESS |
Matches documents containing the specified keyword/phrase in the first paragraph |
Ingress:"yacht race" |
Any document that contains “yacht race” in the first paragraph. |
_____________________________________________________________________
Social Media Operators
Search |
Action |
Example |
Result |
HASHTAG |
Matches documents that contain a hashtag. |
hashtag:"sailing" |
Returns documents that contain #sailing. |
EMOJI |
Matches documents that contain an emoji. |
emojis:😉 |
Returns documents that contain the 😉 emoji. |
TWITTER HANDLE |
Matches documents where a Twitter handle was mentioned. |
@sailmagazine |
Returns Twitter documents that mention @sailmagazine. |
TWEET ID |
Matches the ID of tweets stored within Meltwater. No quotation marks around tweet id. |
tweetId:1271689604677025792 |
Returns the Tweet with the matching ID 1271689604677025792 |
TWITTER THREAD |
Matches replies, retweets, and quoted tweets from a specific tweet. Add in the tweet ID to return this data. |
twitterThread:437331053657980928 |
Returns content from the |
FACEBOOK PAGE |
Matches documents from a specific Facebook page using the page’s ID and asterisks. Use this site to find a page's ID. |
url:"http://www.facebook.com/73471073870/*" |
Returns documents from the Facebook page “Sailing World”. |
TO |
Matches documents with social media handles/usernames that were mentioned. This operator must be used in lowercase. |
to:"americascup" |
Any document mentioning the handle/username “AmericasCup”. |
FROM |
Matches documents that were posted by social media handles/usernames. This operator is case sensitive. |
from:"worldsailing" |
Any document that is published from the handle/username “worldsailing” |
HANDLE |
Matches documents that were posted by social media handles/usernames. |
handle:"worldsailing" |
Any document that is published from the handle/username “worldSailing” |
MENTION |
Matches documents with social media handles/usernames that were mentioned in the document. |
mention:"yachtracinglife" |
Any document mentioning the handle/username “YachtRacingLife”. |
VERIFIED TWITTER HANDLES |
Matches documents from authors with a verified Twitter handle. |
verified:true |
Returns Twitter documents from verified handles. |
UNVERIFIED TWITTER HANDLES |
Matches documents from authors with an unverified Twitter handle. |
verified:false |
Returns Twitter documents from unverified handles. |
ORIGINAL POST/TWEET |
Matches documents that are original posts on Twitter, Reddit, and Instagram. |
metaData.discussionType: og |
Returns documents from Twitter, Reddit, and Instagram that are original posts. |
REPLY TO POST/TWEET |
Matches documents that reply on Twitter, and Reddit. |
metaData.discussionType: re |
Returns documents from Twitter and Reddit that are replies. |
QUOTED TWEET |
Matches documents that are quoted tweets on Twitter. |
metaData.discussionType: qt |
Returns documents from Twitter that are quoted tweets. |
RETWEET |
Matches documents that are retweets on Twitter. |
metaData.discussionType: rp |
Returns documents from Twitter that are retweets. |
FACEBOOK COMMENTS |
Matches documents that are comments on a Facebook page. (The comment operator is applicable to other sources. To see Facebook only, filter by Facebook). |
author:Comment AND author:" Sailing World " (and Facebook source filter applied). |
Returns comments on the Facebook page, "Sailing World". Note: the Facebook page URL operator does not work in combination with the comment operator as comments do not contain the Facebook page ID. |
FACEBOOK VISITOR POSTS |
Matches documents on a Facebook page that come from a visitor. |
author:"visitor post" AND sailing |
Returns posts on Facebook pages from visitors that mention "sailing". |
AUTHORITY |
Matches documents that have an authority score for the author that is equal, greater, or smaller than provided value. Uses inequality operators (see appendix). |
authority >= 5 |
Returns documents from sources with an authority score of 5. |
TWITTER BIO |
Matches Twitter documents that have a specified term in the author’s bio information. |
bio: "yacht enthusiast" |
Matches documents from authors that have “yacht enthusiast” in their bio information. |
TWITTER FOLLOWERS |
Matches Twitter documents from handles that have a number of followers greater, less than, or equal to the value provided. Uses >, >+, <, <=). |
followers: 1000 |
Matches documents from Twitter handles with exactly 1,000 followers |
SUBREDDIT |
Matches Reddit documents from a specific Subreddit. |
SourceName: /r/Boating |
Returns Reddit documents from the Subreddit “r/Boating”. |
REDDIT, FORUM or FACEBOOK THREAD BY TITLE |
Matches Reddit, Forum or Facebook documents under threads with matching title. |
ThreadTitle: "Perfect evening for a little Spanish mackerel fishing" |
Returns Reddit documents from the thread "Perfect evening for a little Spanish mackerel fishing". |
REDDIT, FORUM or FACEBOOK THREAD BY URL |
Matches Reddit, Forum or Facebook documents from a specific URL. |
ThreadUrl: "https://www.reddit.com/ r/boating/comments/cmkchi/aww/" |
Returns Reddit documents from the thread URL "https://www.reddit.com/r/boating/ comments/cmkchi/aww/" |
CLIENT |
Matches documents that have used a recognized device to publish a social media post (same as postSource). |
client: "Twitter for Android" |
Returns Twitter documents that were published using the Android Twitter app. |
POSTSOURCE |
Matches documents that have used a recognized device to publish a social media post (same as client). |
postSource: "Twitter for Android" |
Returns Twitter documents that were published using the Android Twitter app. |
SHARES |
Matches news documents when number of Facebook shares or Twitter retweets is equal, greater or smaller than the provided value. Uses inequality operators (see appendix). |
sailing AND shares > 5000 |
Returns news documents with the term "sailing" that have over 5,000 Facebook shares or Twitter retweets. |
UNPACKED LINKS |
Matches Twitter or Reddit documents that share a URL in the content. Particularly useful for unmasking t.co links. Use a specific link or a general domain with an asterisk to find all shared links from that site. |
link:”https://www.amazon.com*” |
Matches documents that share URLs from the site Amazon.com. |
SOCIAL CHANNEL |
Matches documents from a specific social channel: Twitter, Facebook, Instagram, YouTube, and Reddit. Must be lower case. Use instead of source filters if search terms vary per source and user wants multiple sources returned in results. |
(metaData.source.socialOriginType:" twitter ” AND to:sailingworldmag) OR (metaData.source.socialOriginType:" facebook ” AND author:”Sailing World” AND author:Comment) |
|
_____________________________________________________________________
Complex Operators
Search |
Action |
Example |
Result |
NEWS REACH |
Matches news documents with a number of unique visitors that are equal, greater, or smaller than provided value. Uses inequality operators (see appendix). |
sailing AND reach > =10000 |
Any document that contains the word “sailing” and that has reach greater than or equal to 10,000. |
PRODUCT REVIEW RATING |
Matches Product Review |
ratings > 80 AND sailboat |
Returns Product Review |
TAG |
Matches documents that have been assigned a specific Meltwater tag. Tag name is case sensitive. |
tag:Event |
Returns documents that have |
CATEGORY |
Classifies a document according to a taxonomy of topics (e.g. business, sports, etc.) that belong to the source. Category searching can be used to increase the relevance of search results and only return documents that fall into the specified category. |
Category: "Sports" |
Any document from a source whose topic is classified as “Sports”. |
CONCEPT |
Classifies documents into “concepts” based off key phrases and themes in Wikipedia. Meltwater has analyzed Wikipedia pages using a proprietary algorithm that finds unique keywords, phrases, and themes. These are then attributed to the Wiki page’s topic and the topic becomes a “concept”. Any document in Meltwater that contains those unique keywords, phrases, and themes will be categorized as that concept. Use this to help refine searches by concept (topic) instead of by keyword. This is helpful when your keywords aren’t unique to a specific topic, but you want to return results from a specific topic without limiting your scope with exact qualifying keywords. |
concept:Sailing |
The “Sailing” article in Wikipedia is about the physical act of sailing (e.g. wind velocity, tacking, sail structure, etc.). This example would return documents that also mention those key themes as it relates to sailboats. |
PREFERENCE |
Boost or reduce the score of a word, phrase or sub-expression and decide what is more likely to appear in the hit sentence. The default score is 1, so greater numbers can be used to boost the score, while decimal numbers between 0 and 1 can be used to reduce the score. You must use the ^ in conjunction with numbers (ideally, multiples of 10). Depending on the number given to a keyword, the precedence will be given there. So the higher the number, the more the search is catered to that particular keyword. |
Race AND (yacht ^2 or sailing ^0.5 ) |
Any document that contains the word “race” and either “yacht” or “sailing”. This does not affect the number of results, but affects what keywords are highlighted in the hit sentence of the results. An example of when to use: for email reports when you want a specific keyword from your Boolean to show in the hit sentence. |
QUESTION MARK |
Use this when you are looking for one or more different keywords in a document. |
“sen ? ” |
Any document that contains keywords such as “sent” or “send”. |
XNOT |
Use this when you want to ignore a keyword in special combination with other words or phrases. |
bill XNOT “bill gates” |
Any document where “bill” is present unless it only contains “bill gates”. |
_____________________________________________________________________
Appendix
INEQUALITY OPERATOR
> | Greater than |
Used in: |
>= | Greater or equal to |
|
< | Less than | |
<= | Less or equal to |
DATA SOURCE/SOCIAL CHANNEL OPERATORS
|
SENTIMENT OPERATOR
Positive |
sentiment:"positive" |
Negative |
sentiment:"negative" |
Neutral |
sentiment:"neutral" |
Not Rated |
sentiment:"u" |
CONCEPT OPERATOR
Because the core dependency of the concept search is Wikipedia, it only works with concepts for which Wikipedia pages exist, and only for those languages for which Wikipedia pages exist.
CATEGORY OPERATOR
Category names are in English. The category list below is ordered based on frequency of occurrence with the most common at the top.
- Business
- Science
- Sports
- Government
- Finance
- Health & Medicine
- Food & Beverage
- Entertainment
- Politics
- Technology
- Energy
- Manufacturing
- Culture
- Information Technology
- Legal
- Religion
- Arts
- Engineering
- Hobbies & Leisure
- Agriculture
- Computers
- Education
- Electronics
- Transportation
- Building & Construction
- Lifestyle
- Economy
- Trade
- Social Media
- E-commerce
- Stock Market
- Animals
- Military
- Telecommunications
- Materials
- Retail
- Design
- Careers
- Crime
- News & Media
- Insurance
- Automotive
- Travel
- Family
- Music
- House & Home
- Personal
- Consumer Goods & Services
- Aviation
- Real Estate
- Nautical
- Resources
- Beauty
- Pharmaceutical
- Logistics
- Fashion
- Architecture & Design
- Non Governmental Organizations
- News & Current Affairs
- Hospitality
- Local
Thank you for reading. If you have any further questions, feel free to reach out to us via Live Chat!
Team Meltwater