Advanced query

πŸ”· What happens if I use the Advanced query rule?

When using Advanced query, the other rules do not matter. SentiOne will search for results only on the basis of the query written in the Advanced Query field.

978

πŸ“˜

Don't forget!

Rules such as:

  • Social Profiles
  • Languages
  • Countries

are still being taken into account, even with the Advanced Query. However, you can overwrite them using the Query πŸ‘ˆ

πŸ”· How to start creating Advanced Query?

Advanced Query always starts with an operator defining where the keyword should be placed in results. Our system allows you to search for the keywords in several different ways, nevertheless there are three essential ones:

πŸ”Ή in a content of a mention (rawText), meaning that the keyword has to be placed specifically in the text

πŸ”Ή in a content and context of a mention (_all), so in this case keyword might be placed in the page name, thread name, title of the article, article content, the content of the post commented on Facebook, or even author's name, and mention still will be included in the results)

πŸ”Ήin a title of a mention (title), meaning that the keyword has to be placed specifically in the title of a mention (it refers to online article mostly)

Your first step is to decide which one is best suited for your search. 🌟

πŸ‘

Example

1️⃣ If you wish to broaden your search and include all the comments from the discussion about your brand, even if they don’t contain the keywords directly in the text, you can use all operator in the beginning of your query, like **__all:(samsung)**

2️⃣ In order to narrow the search to the mentions in which the keywords are directly in their text, try rawText operator in the beginning of your query, e.g. rawText:(samsung)

3️⃣ In order to narrow the search to the mentions in which the keywords are in the title only, try title operator in the beginning of your query, e.g. title:(samsung)

πŸ”· How to combine phrases and advanced operators in Advanced Query?

It can be done with AND, OR and NOT basic operators. Learn more about them here πŸ‘‰ Operators and special characters

πŸ”· How to get mentions created on specific day only?

Advanced Query allows you to narrow the results to selected periods. It is incredibly helpful if you need to work on the specific mentions and would like to β€œfreeze” them at a certain point in time (for example: you analyze crisis from the particular day). Try one of the following time operators πŸ‘‰

πŸ”Ή createdAt - is based on the time when the mention was posted in the source (specific dates needed)

πŸ”Ή indexedAt - is based on the time when the mention was saved in SentiOne system (specific dates needed)

πŸ”Ή createdAtHourOfDay - return mentions created in the given hours (no specific dates needed)

(createdAt: [YYYY-MM-DDTHH:MM:SS.ssZ TO YYYY-MM-DDTHH:MM:SS.ssZ])

Example query:
rawText:(samsung) AND (createdAt: [2021-09-22T00:00:00:00Z TO 2021-10-22T00:00:00.00Z])
returns mentions containing word "samsung" created between 22.09-22.10.2021
(indexedAt: [YYYY-MM-DDTHH:MM:SS.ssZ TO YYYY-MM-DDTHH:MM:SS.ssZ])

Example query:
rawText:(samsung) AND (indexedAt: [2021-09-22T00:00:00:00Z TO 2021-10-22T00:00:00.00Z])
returns mentions containing word "samsung" downloaded by SentiOne between 22.09-22.10.2021
(createdAtHourOfDay: [HH TO HH])

Example query:
rawText:(samsung) AND (createdAtHourOfDay: [6 TO 9])
returns mentions containing word "samsung" created between 6:00-9:59 AM

πŸ”· How to create a query narrowing results to negative mentions only?

As almost everything, it is also possible with Advanced Query! πŸ˜‰ Use the following formula to narrow the results to specific sentiment (positive, negative or neutral):

πŸ”Ή opinion:(negative OR positive OR neutral)

πŸ“˜

Don't forget!

Keep in mind that articles are not assigned with any sentiment, so they won't appear in the search! πŸ™…
If you want to include articles in the project, you need to assess their sentiment manually.

πŸ”· How to create a query that will search in articles only?

If you wish to search for specific type of results only (like articles or comments), use the type: advanced operator.

SentiOne allows you to narrow the results to plenty of different mention types ⏩
πŸ”Ή ar – articles
πŸ”Ή st – statements (posts, comments, shares, videos)
πŸ”Ή fc – Facebook comments
πŸ”Ή fm – Facebook private messages
πŸ”Ή fp – Facebook posts
πŸ”Ή fr – Facebook reviews
πŸ”Ή fg – Facebook guest posts
πŸ”Ή db – discussion board from vk.com
πŸ”Ή ph – Facebook mentions with images
πŸ”Ή vd – mentions with video
πŸ”Ή tq – quote tweets
πŸ”Ή tr – X (Twitter) replies
πŸ”Ή t - profile tagged
πŸ”Ή wm - Wykop message

See the example of query using type: below πŸ‘‡

rawText:(samsung) AND (type:ar)
will return articles containing word "Samsung"

_all:(1111111111 AND type: fp) 
will return all posts from Facebook page with id 1111111111

t:@samsung
will return all mentions in which profile "Samsung" was tagged

πŸ”· How can I reproduce Domains rule in Advanced Query?

In order to narrow the search down to specific domain, or exclude the domain from the pool of results, use sourceURLDomain advanced operator. Learn more with following examples ⏩

rawText:(samsung AND sourceURLDomain:(www.twitter.com))
will return X (Twitter) mentions only, containing word "Samsung"

rawText:(samsung AND NOT sourceURLDomain:(www.twitter.com))
will return mentions containing word "Samsung" from all sources beside X(Twitter)

πŸ”· How can I reproduce URLs rule in Advanced Query?

If you wish to use something more specific than domain searching, try sourceURL advanced operator, which allows you to narrow results down to exact URL (for example: forum thread). See how to use sourceURL in practice πŸ‘‡

rawText:(samsung AND sourceURL:(www.popular-phones.com/forum/thread100))
will return mentions from the exact link containing word "Samsung"

πŸ”· How can I exclude authors using Advanced Query?

Advanced Query allows you to include or exclude specific authors or author's gender from the search. Try following operators that help you achieve it:

πŸ”Ή author: - it is based on the author's name

πŸ”Ή sex: - it is based on the author's gender, can be (f) female, (m) male, or (u) unknown

Learn more with examples ⏩

rawText:(samsung) author:"John Doe"
will return mentions containing word "Samsung" written by John Doe 

rawText:(samsung) AND NOT (sex:m)
will return mentions containing word "Samsung" written by women and gender unknown authors