Is it possible to filter only specific field not full documents from elastic search.
sample data.
{
"took": 65,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 1,
"max_score": 4.89784,
"hits": [
{
"_index": "mytest",
"_type": "bank",
"_id": "1",
"_score": 4.89784,
"_source": {
"account_number": 1,
"balance": 39225,
"firstname": "Amber",
"lastname": "Duke",
"age": 32,
"gender": "M",
"address": "880 Holmes Lane",
"employer": "Pyrami",
"email": "amberduke@pyrami.com",
"city": "Brogan",
"state": "IL"
}
}
]
}
expected data.
{
[
{
"account_number": 1,
"balance": 39225,
}
]
}