How to Use Free Form Query in Segments
The free-form query is a tool that allows advanced searches through Monitor data using syntax, available in either the Global Search bar (the upper-right hand corner of your screen within a monitor) or the Segment tool, which allows you to save your queries. Free Form Queries allow for a variety of complex and unique search commands, which you can combine and modify to meet your specific search needs.
Syntax
In Free Form Queries, you can use syntax commands to filter through your Monitors, creating a unique way to view and analyze your data. Through Syntax, you can combine commands, reverse commands, or make them dependent on one another. Syntax commands are available in both the Global Search and in Segments.
AND, OR, and NOT
AND - The Syntax command AND (or &&) can be put between any two queries, making the two dependent. A search that uses AND will only pull mentions that align with BOTH applied rules.
- "food truck" AND region_code:NY (All mentions that contain the phrase "food truck" that are sourced in New York State.)
- sentiment_category:positive AND network:facebook (All mentions from Facebook with positive sentiment.)
OR - The Syntax command OR (or ||) can be put between any two queries, making the two independent. A search that uses OR will pull mentions that align with EITHER applied rule.
- "food truck" OR region_code:NY (All mentions that contain the phrase "food truck" (from anywhere in the world), and all mentions from New York State (with no need to contain "food truck".))
- sentiment_category:positive OR network:facebook (All positive mentions (any network) and all posts from Facebook (any sentiment))
NOT - The Syntax command NOT (or !) can be put between any two queries, making the two dependent. A search that uses NOT will pull mentions that align with one applied rule and do NOT align with the other.
- "food truck" NOT region_code:NY (All mentions that contain the phrase "food truck" that are NOT from New York State.)
- sentiment_category:positive NOT network:facebook (All mentions with positive sentiment that are NOT from Facebook)
Wildcards (? and *)
Wildcard modifiers can be used to account for misspellings and uncertainty in your commands. Use ? to replace one character in a word or phrase, and use * to replace 0 or more characters.
- "gr?y cars for sale" (There are two common ways to spell the color gray/grey, so this modifier will bring in all posts containing "gray cars for sale" or "grey cars for sale")
- skydiv* (In a monitor about skydiving, this modifier will bring in all posts containing "skydive","skydiving","skydived", etc.)
Booleans (+ and -)
Another way to designate Syntax Commands is through Booleans, the + and - symbols. Use + to include a command or keyword/phrase, and use - to exclude a command or keyword/phrase.
- +language:en (All posts in English)
- -"for sale" (All posts without the phrase "for sale")
Grouping
By using Parentheses in your Free Form Queries, you can combine and group Syntax commands. Use parentheses when you have 3 or more commands you want to consider.
- ("food truck" AND region_code:NY) NOT "street tacos" (All posts from New York State that contain the phrase "food truck" and NOT the phrase "street tacos")
- (sentiment_category:positive OR network:facebook) AND hashtags:pizzahut (All posts with positive sentiment containing #pizzahut and all Facebook posts containing #pizzahut)
Global Search
Free Form query is also used in the Global Search Bar. The Global Search Bar allows you to quickly segment data without having to manually create a full segment. Learn how to use those commands HERE.
Useful Commands
Within either Global Search or Segments, there are a variety of commands available to filter through your data, such as including/excluding reshares, only including mentions from a specific region or country, and filtering by influencer score. For a full list of commands, click here.
Filter by Keywords / Phrases
Search your Monitor for posts containing a specific keyword or key phrase.
- "cat video" (All posts containing the phrase "cat video")
- party (All posts containing the keyword "party")
(No command is required for this field, just type your keyword. Capitalization does not matter in this command, but you must put quotation marks around phrases.)
Filter by Influencer Score
Display mentions based on influencer score:
- author_klout_score:>90 (greater than 90)
- author_klout_score:50 (equals 50)
- author_klout_score:<40 (less than 40)
Filter by Author
Username - Search your monitor for all posts by one author via their network handle.
- author_username:NBA (all posts by @NBA)
(This field is case sensitive, so "author_username:nba" will not pull in posts from @NBA)
Real Name - Search your monitor for all posts by one author, using their profile name rather than their handle.
- author_real_name:DVDDY (all posts by @DVDDYMUSIC)
(This field is case sensitive and requires quotation marks around a multi-word name, ie. "Tom Holland")
Filter by Country
Search your Monitor for all posts in one country using the two-digit country code (ISO 3166).
- country_code:US (All posts within the US. For a list of country codes, click here.)
(The country code must be in ALL CAPS. At this time, we have no way to filter for mentions without a country code. Country Codes are only available for Twitter, Instagram, Reddit, and RSS Feeds.)
Filter by State/Region
Search your Monitor for all posts in one region, using the 1-3 digit region code. (ISO 3166).
- region_code:UT (All posts in Utah, USA. For a list of region codes, click here.)
(The region code must be in ALL CAPS. At this time, we have no way to filter for mentions without a region code. Region Codes are only available for Twitter and Instagram.)
NUVI Tip: Region codes are not country sensitive, ie. "region_code:B" will pull in mentions from both Barcelona and Budapest. Use a Syntax command to fix this, ie. "country_code:ES" (Spain) "AND region_code:B" (to pull in ONLY mentions from Barcelona, Spain.)
Include / Exclude Reshares
Search your Monitor for only posts that have been reshared (retweeted), or exclude this content.
- is_reshare:true (Only look at reshared content)
- is_reshare:false (Remove all reshared content)
(The NUVI software classifies a reshare as either a Retweet on Twitter or a unique post with the exact same content.)
Filter by Hashtag
Search your Monitor for posts that contain a specific hashtag.
- hashtags:tuesdaythoughts (All posts with #tuesdaythoughts)
(All hashtags must be in lowercase. However, this will pull all capitalizations, ie. "hashtags:nba" will pull in posts with #NBA, #nba, #Nba, etc.)
Filter by Proximity
Search your Monitor for posts containing two or more words within a specific proximity.
- "guitar sale"~5 (All posts that contain "guitar" and "sale" within 5 words of each other, ie. "guitar for sale", "for sale - acoustic guitar" "my old guitar is for sale", etc.)
(The maximum proximity allowed by the software is 5 words apart.)
Filter by Language
Search your Monitor for posts in a specific language.
- language:en (All posts in English. For a list of language codes, click here.)
- language:_u (All posts in an unknown language. This includes posts containing multiple languages, emojis, or computer symbols like #, @, or &.)
(All language codes must be in lowercase. 60 languages are available to search, listed here.)
Filter by Network
Search your Monitor for posts from a specific network.
- network:twitter (All twitter posts)
- network:rss (All blog, news, RSS posts)
(All networks must be in lowercase. Network search is not compatible with Google+.)
Filter by URL
Search your Monitor for posts containing a trending URL.
- normalized_urls:"https://twitter.com/SamuelLJackson?lang=en" (All mentions containing a URL to Samuel L. Jackson's Twitter)
(All URL's are case sensitive to exactly how they are mentioned in the post, ie. "Twitter.com" will register as a different URL to "twitter.com". Quotation marks around the URL are essential, without them you will pull no data)
Filter by Intention ("Intents")
Search your monitor for posts containing 1 of 4 "intents," to buy, sell, recommend, or quit.
- intents:buy (Only posts looking to make a purchase.)
- intents:sell (Only posts looking to sell a product or service.)
- intents:recommend (Only posts looking for a recommendation.)
- intents:quit (Only posts looking to leave a current product or service.)
(All intents must be in lowercase and spelled correctly to pull data)
Filter by Sentiment
Category - Search your Monitor for posts with a specific sentiment type.
- sentiment_category:positive
- sentiment_category:neutral
- sentiment_category:negative
(All sentiment categories must be in lowercase.)
Tense
Display mentions based on tense:
tense_category:past
tense_category:present
tense_category:future
Vulgarity
Display mentions based on their Vulgarity. Vulgarity uses both greater than(>) and less than(<) symbols with any number between 0-1.
vulgarity_score >.8
vulgarity_score<.2
Score - Search your Monitor for posts within a sentiment score range. Our Sentiment partner, Lexalytics, ranks all posts in your Monitor with a sentiment score between 1 and -1. Positive, Neutral, and Negative rankings are assigned based on the following:
1 to 0.31: Positive Sentiment
0.3 to -0.3: Neutral Sentiment
-0.31 to -1: Negative Sentiment
Use the modifiers > and < to look at sentiment score within a specific range.
- sentiment_score:<-0.3 (All posts with negative sentiment)
- sentiment_score:>0 (All posts from perfectly neutral to fully positive sentiment)
(Keep in mind, no posts have a sentiment score outside of -1 to 1, so if this command is not pulling mentions, make sure to check your parameters)
Overall, Free Form Queries can be used to filter Monitor data in a variety of ways. Use the Global Search bar for a one-time search, and the Free Form Query box in Segments to save commands and syntax for your entire company, permanently. Need more information? Contact your CSM.
Twitter Replies to A Specific Tweet
Open up the tweet you want to see the replies to on the Twitter platform.
Copy the Twitter ID from the end of the URL.
Paste this ID into the below free form query:
- parent_social_source_id:1234868802543898624
Twitter Bio
Search your mentions and understand audience demographics by the Twitter Author Bio.
- bio:CEO (Or whichever you would like to search, CFO, Reporter, etc.)
Comments
0 comments
Article is closed for comments.