Glypse
Social Intelligence

Query Syntax

Query operators determine which posts contribute to the Social Intelligence dashboard's results.

In the Social Intelligence dashboard, Write queries lets you enter the terms that posts must match. The same syntax applies to queries generated through Ask a question, which you can edit after they appear. Those matches, together with the time range and any topic filter, determine the posts behind the charts and feed.

In Write queries, Analyze submits your edits; Enter from a query input does the same. Until then, the results describe the last submitted queries. Getting Started explains the dashboard controls and how to compare several queries.

Words and phrases

A space between terms requires all of them to appear in the same post. For example, AI energy matches posts containing both words, in either order. Matching is case-insensitive, so AI and ai produce the same matches.

To matchSyntaxExample
All termsTerms separated by a spaceAI energy
Either term, or bothA pipe between alternativesvegetarian | vegan
A phraseStraight double quotes around the phrase"White House"
A term while excluding anotherA minus sign directly before the excluded termcrypto -bitcoin

Quotes require the words to occur next to each other in the stated order. Without quotes, white house can match a post where those words appear far apart. Phrase matching still normalizes the text: capitalization and punctuation do not have to reproduce the quoted string exactly.

A query for vehicle does not also match vehicles. The alternative vehicle | vehicles includes both forms. Similarly, a name and its abbreviation need separate terms if either is to match.

Alternatives are useful when the same subject appears under several names. Nvidia | NVDA includes posts using either the company name or its ticker. Both terms belong to one query, so a post containing both is still counted once in that query's results. Separate query rows instead produce results that can be compared.

An exclusion removes the whole post. crypto -bitcoin omits a post containing “bitcoin” even if that post also discusses other cryptocurrencies. A minus sign before an opening quote excludes the entire phrase, as in energy -"fossil fuels".

These symbols have specific meanings in the query bar. The words AND, OR, and NOT are ordinary query terms.

Combining alternatives and required terms

Order matters when a query mixes spaces and the pipe character. These two queries match different sets of posts:

QueryMatching posts
streaming movies | showsPosts with both “streaming” and “movies,” or any post with “shows.”
movies | shows streamingPosts with “streaming” and at least one of “movies” or “shows.”

In the first query, a post mentioning only “shows” qualifies. In the second, every matching post must contain “streaming.” Moving a required term therefore changes which alternatives it applies to.

Parentheses let you state the grouping explicitly. streaming (movies | shows) requires “streaming” together with either “movies” or “shows.” It has the same meaning as the second row above.

Grouping also makes a shared exclusion clear. ("machine learning" | AI) -regulation matches either “machine learning” or “AI” and excludes every post containing “regulation.”

Several groups can work together in one query. (Nvidia | AMD) (GPU | chip) -mining requires at least one company term and at least one of “GPU” or “chip,” while excluding posts containing “mining.” Each group supplies a choice, and the space between the groups requires both choices to be satisfied in the same post.

Hashtags, cashtags, and handles

The prefixes below require the symbol as part of the text match. They distinguish a hashtag, ticker cashtag, or handle from an ordinary occurrence of the word.

QueryMatching posts
#RemoteWorkPosts containing the hashtag #RemoteWork.
$AAPLPosts containing the cashtag $AAPL.
@nytimes.comPosts containing the full handle @nytimes.com in their text.

Matching a handle requires its full spelling, including the domain. A query for @nytimes.com matches text mentioning that handle; it does not select every post written by that account.

A bare domain such as nytimes.com also matches post text. It can occur in a link or elsewhere in the text, so this query does not restrict results to posts linking to that site.

Prefixes combine with the other operators. For example, #Tesla | #Rivian matches either hashtag, while electric vehicles -#ad requires both words and excludes posts containing the hashtag #ad. The Mentions tab shows the hashtags, cashtags, link domains, and handles found in the posts your query matches.

Topic filtering

The Filter button beside the time range opens the topic checklist. On a narrow screen, it appears as a filter icon. Apply saves the category selection for the next analysis. In Write queries, Analyze reruns the existing queries with that selection.

The filter keeps posts assigned at least one selected category. Selecting Business and Technology, for example, keeps posts classified under either category or both. Each post must also match the query and fall within the selected time range. The filter applies to every query in the bar.

Selecting All or None removes the topic restriction. The available categories and their interpretation are explained in Topics.

Topic filtering uses classification labels. Typing technology in the query bar instead requires that word in the post text. A post can be classified as Technology without containing the word itself.

For example, $AAPL | $GOOGL | $MSFT with News selected includes posts carrying at least one of those cashtags and classified as News. The query supplies the text conditions, and the topic filter adds a separate classification condition. This combination can focus a broad set of terms on a particular subject area without requiring that category's name to appear in the posts.

Query validation

A query needs a term to match before it can exclude other terms. If you enter only -bitcoin, the dashboard asks for a matching term. crypto -bitcoin supplies one.

The dashboard also rejects a query when all its matching terms are single characters, such as x, or when they are all common words, such as the and. An error message explains which rule applies. Adding a longer name or phrase, such as space telescope, supplies terms that pass both checks.

An input that reads like a question can produce a separate suggestion to use Ask a question. Its words would otherwise be treated as query terms. That suggestion offers to move the text into the question field, where you can review it before submitting, or Keep as a query if you intend to use the text as written.