Firstly: ES is a great piece of software. Many thanks!
I am using the term_stats facets to sum the value of a field 'grouped by' a
facet key. Not all records in the index have a value for this facet key.
The only problem is dealing with these 'empty' facet keys.
By default, I get a histogram of available facet keys and sum(count).
However the question is how to work out sum(count) for those records
without the facet key?
If I were using a simple counting (term) facet (as opposed to term_stats
with a sum) I could use the 'missing' value that is returned. However, that
does not help as I need the sum(count field) for the missing records.
Possible?
Ideally it would be possible to:
Ask ES to sum the count field for the records without that facet field
and return as missing_total
(Maybe cleaner) Signal that I would like ES to consider a virtual
'MISSING' facet that gets stats applied, ranked and returned if applicable.
That sounds like a good idea. Could you create an issue for it?
On Friday, November 2, 2012 4:47:48 AM UTC-4, Alastair James wrote:
Hi there.
Firstly: ES is a great piece of software. Many thanks!
I am using the term_stats facets to sum the value of a field 'grouped by'
a facet key. Not all records in the index have a value for this facet key.
The only problem is dealing with these 'empty' facet keys.
By default, I get a histogram of available facet keys and sum(count).
However the question is how to work out sum(count) for those records
without the facet key?
If I were using a simple counting (term) facet (as opposed to term_stats
with a sum) I could use the 'missing' value that is returned. However, that
does not help as I need the sum(count field) for the missing records.
Possible?
Ideally it would be possible to:
Ask ES to sum the count field for the records without that facet field
and return as missing_total
(Maybe cleaner) Signal that I would like ES to consider a virtual
'MISSING' facet that gets stats applied, ranked and returned if applicable.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.