Skip to main content

Supported Operators and Query Conditions

C
Written by Cary Olson
Updated over 3 months ago

When creating a listening topic, you can use Advanced Query Mode to flexibly combine Boolean operators and filtering conditions, enabling more precise content filtering and high-quality matching. OneSight supports the following advanced query syntax:

一、Query Operators

Query Operators

Purposes

Examples

OR

Meet any one of multiple query conditions

"Tesla" OR "Cybertruck" OR "Model S" Returns content containing "Tesla" or "Cybertruck" or "Model S"

AND

Multiple query conditions must be met at the same time

"Cybertruck" AND "Speed" Returns content containing both "Cybertruck" and "Speed".

()

Group query conditions, giving priority to the query logic within the brackets.

("Cybertruck" OR "Model S") AND "Speed" Returns content that contains both "Cybertruck" and "Speed", or content that contains both "Model S" and "Speed".

*

Fuzzy matching of word stems (suffixes).

"TeslaModel*" Matches any word starting with "TeslaModel", such as "TeslaModelY", "TeslaModel3", etc.

NOT

Exclude specific keywords

"Tesla" NOT "Cybertruck" Returns content that contains "Tesla" but does not contain "Cybertruck".

NEAR/n

Find the relative proximity between two keywords (no order requirement), which can be no more than n words apart, where n can only be 0 or a positive integer.

"Samsung" NEAR/3 "S12" Returns results where "Samsung" and "S12" are within 3 words (or less) of each other in the text.

ONEAR/n

Similar to NEAR, but it requires that the order of words must be consistent and n can only be 0 or a positive integer.

"Samsung" ONEAR/3 "S12" In the returned results, "Samsung" must appear first, and then "S12" must appear within the next 3 words.

二、Query Conditions

Conditions Types

Purposes

Examples

Language:

To restrict the language of the content

Language: "en" Only English content is returned.

Country:

To restrict the author's country

Country: "cn" Only return content from China.

Sentiment:

To restrict content sentiment

Sentiment: "Positive" Return only positive results.

Author:

To restrict the author

Author: "xiaomi" Return only content from this author (complete match of author name or handle).

Site:

To restrict specific website

Site: "36kr.com" Return only content from this page.

URL:

To restrict specific URLs

URL:"https://www.bbc.com/news/articles/*" Only return content from this URL.

3. Usage Recommendations

  • Operators are case-insensitive, but we recommend using uppercase (e.g., AND, OR) for better readability.

  • Use parentheses () to group complex logic in query statements whenever possible.

  • Query statements can be combined with filtering conditions. For complex scenarios, e.g:

 ("Tesla" OR "Cybertruck") AND Language:"en" AND Sentiment:"Negative"
  • For complex query scenarios (such as competitor comparison, sequential expressions, or multilingual combinations), please feel free to contact the OneSight Customer Success Team for assistance.

Did this answer your question?