NLPchina / elasticsearch-sql

Use SQL to query Elasticsearch
Apache License 2.0
6.99k stars 1.54k forks source link

access doc_count in scripted_metric section. #253

Open Shashi-GS opened 8 years ago

Shashi-GS commented 8 years ago

Could you please help me on accessing the doc_count or the value_count aggregation result in the scripted metric section?

shi-yuan commented 8 years ago

have a look at the Scriptable Metric Aggregation

baiyuang commented 7 years ago

Have you solved the problem? @Shashi-GS

baiyuang commented 7 years ago

@shi-yuan 怎么样在脚本聚合scripted_metric中使用上次terms的doc_count?

shi-yuan commented 7 years ago

可以使用Pipeline Aggregations,或者在Scripted Metric Aggregation统计terms的doc_count

baiyuang commented 7 years ago

统计terms的doc_count方便给个具体例子吗

shi-yuan commented 7 years ago

Scripted Metric Aggregation ? Have a look at #490,may be of help to you