Hi,
I have a query that returns the hits
field nested inside key
andaggregations
.
I'm using curl to send the data to logstash for further processing and I would like to make my life a bit easier by only having to process whatever is in the hits field. However if I do something like /_search?q=elasticsearch&filter_path=took,hits.hits._id,hits.hits._score
the return is always hits [ ]
.
My documents looks like this
"aggregations" : {
"location" : {
"doc_count_error_upper_bound" : 0,
"sum_other_doc_count" : 0,
"buckets" : [
{
"key" : "8913514",
"doc_count" : 6898,
"latest_data" : {
"hits" : {
"total" : {
"value" : 6898,
"relation" : "eq"
},
"max_score" : null,
"hits" : [
{
"_index" : "test",
"_type" : "doc",
"_id" : "123",
"_score" : null,
"_source" : {
"@timestamp" : "2017-08-04T16:59:00.209Z",
"gps_location_geo" : "12345",
"location" : "somewhere"
},
"sort" : [
"somewhere"
]
}
]
}
}
}