Update multi-get.asciidoc

Documented that the fields parameter can be passed in the query string.

Closes #4006
This commit is contained in:
Clinton Gormley 2014-11-08 13:54:03 +01:00
parent 37baba0f18
commit f5ad699284
1 changed files with 20 additions and 0 deletions

View File

@ -178,6 +178,26 @@ curl 'localhost:9200/_mget' -d '{
}'
--------------------------------------------------
Alternatively, you can specify the `fields` parameter in the query string
as a default to be applied to all documents.
[source,js]
--------------------------------------------------
curl 'localhost:9200/test/type/_mget?fields=field1,field2' -d '{
"docs" : [
{
"_id" : "1" <1>
},
{
"_id" : "2",
"fields" : ["field3", "field4"] <2>
}
]
}'
--------------------------------------------------
<1> Returns `field1` and `field2`
<2> Returns `field3` and `field4`
[float]
=== Generated fields