My mistake sorry,
Here is an example:
I have the request document:
"request":{
"dynamic" : "strict",
"properties" : {
"time" : {
"format" : "dateOptionalTime",
"type" : "date"
},
"user_id" : {
"index" : "not_analyzed",
"type" : "string"
},
"country
I was only thinking loud. I mean that I don't know what your model looks like.
May be you could illustrate your use case with some actual data and we can move
forward from here?
What kind of documents are you actually indexing and searching for? What fields
do you have?
--
David Pilato | Tech
Hi David
Thank you for your reply, so based on your suggestion I should maintain a
document (e.g. user) with some aggregated values and I should update it as
we move along with our indexing of our data, correct?
This though would only give me totals. I cannot apply something like a
range. I f
Imagine that you have indexed users.
User has a numberOfDocs field.
You can build a range aggregation on top of that and gives back the count for
buckets like:
numberOfDocs < 2
1 < numberOfDocs < 3
…
See
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-
Hi,
I wanted to ask whether it is possible to get with the aggregation
framework the distribution of one specific type of documents sent per user,
I'm interested for occurrences of documents per user, e.g. :
1000 users sent 1 document
500 ussers sent 2 documents
X number of unique users sent