Add CONSOLE to source filtering docs

This commit is contained in:
Isabel Drost-Fromm 2016-05-18 15:20:21 +02:00
parent a849cc97ea
commit c20a669c2d
1 changed files with 8 additions and 0 deletions

View File

@ -13,6 +13,7 @@ To disable `_source` retrieval set to `false`:
[source,js] [source,js]
-------------------------------------------------- --------------------------------------------------
GET /_search
{ {
"_source": false, "_source": false,
"query" : { "query" : {
@ -20,6 +21,7 @@ To disable `_source` retrieval set to `false`:
} }
} }
-------------------------------------------------- --------------------------------------------------
// CONSOLE
The `_source` also accepts one or more wildcard patterns to control what parts of the `_source` should be returned: The `_source` also accepts one or more wildcard patterns to control what parts of the `_source` should be returned:
@ -27,6 +29,7 @@ For example:
[source,js] [source,js]
-------------------------------------------------- --------------------------------------------------
GET /_search
{ {
"_source": "obj.*", "_source": "obj.*",
"query" : { "query" : {
@ -34,11 +37,13 @@ For example:
} }
} }
-------------------------------------------------- --------------------------------------------------
// CONSOLE
Or Or
[source,js] [source,js]
-------------------------------------------------- --------------------------------------------------
GET /_search
{ {
"_source": [ "obj1.*", "obj2.*" ], "_source": [ "obj1.*", "obj2.*" ],
"query" : { "query" : {
@ -46,11 +51,13 @@ Or
} }
} }
-------------------------------------------------- --------------------------------------------------
// CONSOLE
Finally, for complete control, you can specify both include and exclude patterns: Finally, for complete control, you can specify both include and exclude patterns:
[source,js] [source,js]
-------------------------------------------------- --------------------------------------------------
GET /_search
{ {
"_source": { "_source": {
"include": [ "obj1.*", "obj2.*" ], "include": [ "obj1.*", "obj2.*" ],
@ -61,3 +68,4 @@ Finally, for complete control, you can specify both include and exclude patterns
} }
} }
-------------------------------------------------- --------------------------------------------------
// CONSOLE