2

I am using the significant terms aggregation in ElasticSearch and I am wondering if it is possible to add a custom field to each element in the bucket. Currently, the bucket element looks like this:

{
    "key" : "Q",
    "doc_count" : 4,
    "score" : 4.731818103557571,
    "bg_count" : 22
},

By default there are 4 fields and I want to add something here which are computed from the documents belonging here (4 documents in the example above).

I found that there is a way to customize the score itself but that's not what I want. What I want is to add a new custom field which is calculated from the documents having the same key.

kee
  • 10,969
  • 24
  • 107
  • 168

0 Answers0