Update multi-get.asciidoc
Documented that the fields parameter can be passed in the query string. Closes #4006
This commit is contained in:
parent
37baba0f18
commit
f5ad699284
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue