How to get specified fields in elasticsearch 5.1 (using curl)?

use "docvalue_fields" ,
GET /_search
{
"query" : {
"match_all": {}
},
"docvalue_fields" : ["test1", "test2"]
}

1 Like