Advanced query

:large-blue-diamond: 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 :point-left:

:large-blue-diamond: 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:

:small-blue-diamond: in a content of a mention (rawText), meaning that the keyword has to be placed specifically in the text

:small-blue-diamond: 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)

:small-blue-diamond: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. :star2:

👍

Example

:one: 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)**

:two: 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)

:three: 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)

:large-blue-diamond: 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 :point-right: Operators and special characters

:large-blue-diamond: 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 :point-right:

:small-blue-diamond: createdAt - is based on the time when the mention was posted in the source (specific dates needed)

:small-blue-diamond: indexedAt - is based on the time when the mention was saved in SentiOne system (specific dates needed)

:small-blue-diamond: 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

:large-blue-diamond: How to create a query narrowing results to negative mentions only?

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

:small-blue-diamond: 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! :no-good:
If you want to include articles in the project, you need to assess their sentiment manually.

:large-blue-diamond: 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 :fast-forward:
:small-blue-diamond: ar – articles
:small-blue-diamond: st – statements (posts, comments, shares, videos)
:small-blue-diamond: fc – Facebook comments
:small-blue-diamond: fm – Facebook private messages
:small-blue-diamond: fp – Facebook posts
:small-blue-diamond: fr – Facebook reviews
:small-blue-diamond: fg – Facebook guest posts
:small-blue-diamond: db – discussion board from vk.com
:small-blue-diamond: ph – Facebook mentions with images
:small-blue-diamond: vd – mentions with video
:small-blue-diamond: tq – quote tweets
:small-blue-diamond: tr – X (Twitter) replies
:small-blue-diamond: t - profile tagged
:small-blue-diamond: wm - Wykop message

See the example of query using type: below :point-down:

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

:large-blue-diamond: 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 :fast-forward:

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)

:large-blue-diamond: 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 :point-down:

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

:large-blue-diamond: 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:

:small-blue-diamond: author: - it is based on the author's name

:small-blue-diamond: sex: - it is based on the author's gender, can be (f) female, (m) male, or (u) unknown

Learn more with examples :fast-forward:

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