Getting custom calculated value in script field of Elasticsearch -


i want multiplication of 2 values in script field in elastic search shown in image. how this?

enter image description here

i using below aggregation code

{     "aggs": {         "mention": {             "terms": {                 "size": 20,                 "field": "username"             },             "aggs": {                 "mention_hits": {                     "top_hits": {                         "sort": [                             {                                 "published_date": {                                     "order": "desc"                                 }                             }                         ],                         "_source": {                             "include": [                                 "klout"                             ]                         },                         "size": 1                     }                 },                 "user_ranking": {                     "max": {                         "script": " 123 "                     }                 }             }         }     } } 


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -