DateHistogramFacet, removing duplicates

Hi!

I have an ES index of documents culled from products with unique serial numbers reporting phoning home, along with the timestamp of when they reported and a bunch of other data that I'd like to report on:

{ 'timestamp': whatevs, 'serial': '123', ... }, etc...

A problem is that sometimes the product will phone home more than once a week, if for example it was rebooted.

My aim is to construct an ES query, returning a DateHistogramFacet of matches per month or per quarter, where I would like at most one unique serial number to be counted per week, thus if a particular product happens to report multiple times a week, it contributes at most once to the total count. Essentially, removing duplicate entries where duplicate is defined as the same serial number having two json documents within the same 7 day period.

Is there an easy way to accomplish this within ES?

Thanks!
A.

Did you try the distinct_date_histogram of elasticsearch-timefacets-plugin?

On 17/07/2013 15:05, ajses wrote:

Hi!

I have an ES index of documents culled from products with unique serial
numbers reporting phoning home, along with the timestamp of when they
reported and a bunch of other data that I'd like to report on:

{ 'timestamp': whatevs, 'serial': '123', ... }, etc...

A problem is that sometimes the product will phone home more than once a
week, if for example it was rebooted.

My aim is to construct an ES query, returning a DateHistogramFacet of
matches per month or per quarter, where I would like at most one unique
serial number to be counted per week, thus if a particular product happens
to report multiple times a week, it contributes at most once to the total
count. Essentially, removing duplicate entries where duplicate is defined as
the same serial number having two json documents within the same 7 day
period.

Is there an easy way to accomplish this within ES?

Thanks!
A.

--
View this message in context: http://elasticsearch-users.115913.n3.nabble.com/DateHistogramFacet-removing-duplicates-tp4038261.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.