Sample response from Spring Data Elasticsearch for Page is given below
"content": [ { "id": "MMb-sHUBU93O1WjGd0M1", "pid": "12500000", "bi": { "bar": 27, "height": { "feet": 5, "inches": 6, }, }, ]
As to retrieving partial attributes, use _source
:
GET /_search
{
"_source": {
"includes": [
"Foo.id",
"Foo.bi"
],
"excludes": []
}
}
Regarding
How to query just partial attributes
you're sending a query againt the whole index in ES and the query
parameter enables you to filter concrete fields so it does not really make sense to talk about querying partial attributes -- that's what the query
already does.