The Bulk API docs mention the query parameter _source
, however, when I add the parameter to the request, no source fields are included.
For example:
curl -X POST "localhost:9200/_bulk?_source=field1" -H 'Content-Type: application/json' -d'
{ "index" : { "_index" : "test", "_id" : "1" } }
{ "field1" : "value1" }
{ "index" : { "_index" : "test", "_id" : "3" } }
{ "field1" : "value3" }
{ "index" : {"_id" : "2", "_index" : "test"} }
{ "doc" : {"field2" : "value2"} }
'
This returns the normal response but doesn't include field1 from _source as requested.
Am I missing something?