copyright | lastupdated | ||
---|---|---|---|
|
2017-10-09 |
{:shortdesc: .shortdesc} {:new_window: target="_blank"} {:tip: .tip} {:pre: .pre} {:codeblock: .codeblock} {:screen: .screen} {:javascript: .ph data-hd-programlang='javascript'} {:java: .ph data-hd-programlang='java'} {:python: .ph data-hd-programlang='python'} {:swift: .ph data-hd-programlang='swift'}
{: #query-operators}
Operators are the separators between different parts of a query. For the complete list of available operators, see the Query reference.
{: #delimiter}
This delimiter separates the levels of hierarchy in the JSON schema
For example:
enriched_text.concepts.text
{: codeblock}
{: #includes}
This operator specifies a match for the query term.
For example:
enriched_text.concepts.text:cloud computing
{: codeblock}
{: #match}
This operator specifies an exact match for the query term.
For example:
enriched_text.concepts.text::cloud computing
{: codeblock}
{: #notinclude}
This operator specifies that the results do not contain a match for the query term
For example:
enriched_text.concepts.text:!cloud computing
{: codeblock}
{: #notamatch}
This operator specifies that the results do not exactly match the query term
For example:
enriched_text.concepts.text::!cloud computing
{: codeblock}
{: #escape}
Escape character for queries that require the ability to query terms by using string literals that contain control characters.
For example:
enriched_text.concepts.text:\!cloud computing
{: codeblock}
{: #phrase}
All contents of a phrase query are processed as escaped. So no special characters within a phrase query are parsed, except for double quotes ("
) inside a phrase query, which must be escaped (\"
). Use phrase queries with full-text, rank-based queries, and not with boolean filter operations. Do not use wildcards (*
) in phrase queries. Note: single quotes ('
) are not supported.)
For example:
enriched_text.concepts.text:"IBM watson"
{: codeblock}
{: #nestedquery}
Logical groupings can be formed to specify more specific information.
For example:
filter-entities:(text:IBM,type:Company)
{: codeblock}
{: #or}
Boolean operator for "or".
For example:
query-enriched.entities.text:Google|IBM
{: codeblock}
{: #and}
Boolean operator for "and".
For example:
query-enriched.entities.text:Google,IBM
{: codeblock}
{: #comparisons}
Creates numerical comparisons of less than or equal to, greater than or equal to, greater than, and less than.
For example:
`enriched_text.sentiment.document.score>0.679`
{: codeblock}
{: #multiplier}
Increases the score value of a search term.
For example:
query-enriched_text.concepts.text:IBM^3
{: codeblock}
{: #Wildcard}
Matches unknown characters in a search expression.
For example:
query-enriched_text.concepts.text:IBM*
{: codeblock}
{: #variation}
The number of one character changes that need to be made to one string to make it the same as another string. For example car~1
will match car
,cap
,cat
,can
, etc..
For example:
query-enriched_text.concepts.text:Watson~3
{: codeblock}