DSL: Put Result of Aggregation into HIts


#1
  1. When a person do a DSL search the result will usually end up in the hits field.

  2. When a person do a DSL aggregation, the result will be in an "aggregation" field

Can I copy the result in "aggregation" into the "hits" field?


(Colin Goodheart-Smithe) #2

Could you explain your problem a bit more. Why do you need the aggregation results in the hits field? why can you not just access the aggregations results form the aggregation field?


#3

The down stream application can only read "hits" field


(Colin Goodheart-Smithe) #4

There is no way to change the output format of Elasticsearch in this way. You will need to change your downstream application. Even if you could do this your downstream application would no doubt have to change since the format of aggregation results is completely different from hits.


(system) #5

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.