mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 15:47:23 -04:00
Add Autosense annotation for query dsl testing
this adds the autosense annotation to a couple of query dsl docs files and fixes the snippets to work in the tests along the way.
This commit is contained in:
parent
17225d9ac1
commit
e486560ea8
15 changed files with 304 additions and 87 deletions
|
@ -8,15 +8,19 @@ an example:
|
|||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
GET /_search
|
||||
{
|
||||
"query": {
|
||||
"simple_query_string" : {
|
||||
"query": "\"fried eggs\" +(eggplant | potato) -frittata",
|
||||
"analyzer": "snowball",
|
||||
"fields": ["body^5","_all"],
|
||||
"default_operator": "and"
|
||||
}
|
||||
}
|
||||
}
|
||||
--------------------------------------------------
|
||||
// CONSOLE
|
||||
|
||||
The `simple_query_string` top level parameters include:
|
||||
|
||||
|
@ -94,13 +98,17 @@ introduced fields included). For example:
|
|||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
GET /_search
|
||||
{
|
||||
"query": {
|
||||
"simple_query_string" : {
|
||||
"fields" : ["content", "name.*^5"],
|
||||
"query" : "foo bar baz"
|
||||
}
|
||||
}
|
||||
}
|
||||
--------------------------------------------------
|
||||
// CONSOLE
|
||||
|
||||
[float]
|
||||
==== Flags
|
||||
|
@ -110,13 +118,17 @@ should be enabled. It is specified as a `|`-delimited string with the
|
|||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
GET /_search
|
||||
{
|
||||
"query": {
|
||||
"simple_query_string" : {
|
||||
"query" : "foo | bar + baz*",
|
||||
"flags" : "OR|AND|PREFIX"
|
||||
}
|
||||
}
|
||||
}
|
||||
--------------------------------------------------
|
||||
// CONSOLE
|
||||
|
||||
The available flags are: `ALL`, `NONE`, `AND`, `OR`, `NOT`, `PREFIX`, `PHRASE`,
|
||||
`PRECEDENCE`, `ESCAPE`, `WHITESPACE`, `FUZZY`, `NEAR`, and `SLOP`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue