ElasticSearch Users
Search
everywhere
only in this topic
Advanced Search
How to Achieving count(distinct(doc['userId'])) with facets script
Classic
List
Threaded
♦
♦
Locked
1 message
saud.rehman
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Report Content as Inappropriate
♦
♦
♦
♦
How to Achieving count(distinct(doc['userId'])) with facets script
This post has NOT been accepted by the mailing list yet.
{
"query" : {
"match_all" : { }
},
"facets" : {
"stats" : {
"terms_stats" : {
"key_field" : "tag",
"value_script" : "count(distinct(doc['num1'].value))"
}
}
}
}
Loading...
Powered by
Nabble
Edit this page