...
The + or required operator requires that the term after the + symbol exist somewhere.
The - or prohibit operator excludes documents that contain the term after the - symbol.
Example Queries
Query | Description |
---|---|
squirro AND memonic | Search documents that contain squirro and memonic. |
squirro OR memonic | Search documents that contain either squirro or memonic. |
+memonic -squirro | Search documents that contain memonic but do not contain squirro. |
squirro NOT memonic | Search documents that contain squirro but do not contain memonic. |
Grouping
Use round brackets / parentheses for grouping.
Example Queries
Query | Description |
---|---|
(java AND solr) OR (python AND elasticsearch) | Search documents that contain both java and solar, or documents that contain both python and elasticsearch. |
nektoon AND (squirro OR memonic) | Search documents that contain nektoon and either squirro or memonic. |
Phrase Search
Use double quotes at the beginning and ending of a phrase to perform a phrase search. Phrases must match exactly (i.e. no stemming is applied within a phrase). Phrase search is useful to make the search results more precise by making sure that terms have to be found within close distance (per default the distance is set to 5 terms).
You can also add a slop to the phrase with a tilde ~
at the end of the phrase to do a proximity search to manually specify the allowed distance between terms.
Example Queries
Query | Description |
---|---|
"oracle financial services"~1 | Find documents where oracle, financial and services match in exact this order and within three terms. |
"oracle financial leasing"~3 | Find documents where oracle, financial and leasing must match but allow for up to 3 additional terms between them. The order of the terms is no longer strict, but swapping two words is equivalent to adding two words in terms of edit distance. |
"oracle financial services" | Find documents where oracle, financial and services are found within the configured default |
Wildcard Search
Use * and ? to perform a wildcard search. Multiple character wildcard searches look for 0 or more characters and the single character wildcard search looks for terms that match that with the single character replaced. Wildcard search can also apply per field. Leading wildcards are allowed, but note that they can be very slow and potentially timeout within Elasticsearch. In order to prevent extremely slow wildcard queries, a wildcard term should not start with one of the wildcards * or ?
Example Queries
Query | Description |
---|---|
| Search documents that contain e.g. for squirro and squirrel. |
| Search documents that contain e.g. for memonic and mnemonic. |
| Search documents that contain e.g. for test and text. |
| Search documents that have e.g. the field "name" 1 |
| Search documents that do not have e.g. the field "name" 1 |
| Search documents that contain the "name" field started by "squir", e.g. name:squirro and name:squirrel. 1 |
1 Note that facet names containing spaces need to be put inside quotes in queries
...
Only search in specific fields
Query | Description |
---|---|
$title:France | Search documents that have the term France in the title |
$body:France | Search documents that have the term France in the document body |
$item_id:PgnAQM1FTSCP1uNOesoE7Q | Search for a specific document by id |
$item_created_at >= "2015-02-01T00:00:00" | Search documents created after Feb. 2, 2015 |
$item_created_at <= "2015-02-01T00:00:00" | Search documents created before Feb. 2, 2015 |
$item_created_at >= "now-7d/d" | Search documents created in the last 7 days |
$_size > 100000 | Search documents with size > 100'000 bytes |
Facet Search
Use any document facet to restrict the search.
Query | Description |
---|---|
Country:France | Search documents that have a facet named Country with a value France |
Country:"United Kingdom" | Search documents that have a facet named Country with a value United Kingdom |
"Mixed Sentiment":Yes 1 | Search documents that have a facet named Mixed Sentiment with a value Yes |
1 Note that facet names containing spaces need to be put inside quotes in queries
...
Individual elements of a query can be prioritized by boosting them. Note that sorting needs to be by relevance to notice the changed relevance scores.
Query | Description |
---|---|
France^10 Europe | Search for France and Europe, but boost matches of “France”. |
France OR Country:France^10 | Search for France in full text, as well as the “Country” facet and boost items that have the value defined in the country facet. |
France^0.1 Europe | Search for France and Europe, but de-prioritize matches of “France” (the default boost is 1.0). |
Sorting
You can use the following query syntax to sort the result:
...
2 Note: The square brackets above mean that those fields are optional. Those brackets are not part of the syntax.
Example Queries
Query | Description |
---|---|
| Sort by date (descending order by default) |
| Sort by date in ascending order |
| Sort by relevance in descending order |
| Sort by "my_sortable_facet" in descending order; additionally add a second sorting by descending date |
| Sort query by date (default order is descending) |
Time Increment
It is possible to control the time increments shown in the main timeline and in the dashboard widgets. To do so, add time_increment:<value>
to a query.
...