Nested type and range facet

Howdy,

I'm trying to do a query with a range facet that has the key field come from
the parent document and the value field values come from all nested
documents. Here's a gist of the idea

What I'm hoping for is to have each rating range facet have the min, max,
average, etc of the prices within the nested document of the matching
containing document.

Now that I look at it again at the nested facet documentation, I'm thinking
this isn't possible, but I'd loved to be proved wrong.

Cheers,
Dan

This is not possible, but, what you can do is set include_in_parent on the
nested mapping, which will cause the values to also be indexed in the parent
doc. The range facet supports cases with single key multiple values per doc.

On Fri, Aug 5, 2011 at 6:43 AM, Dan Everton dan@iocaine.org wrote:

Howdy,

I'm trying to do a query with a range facet that has the key field come
from the parent document and the value field values come from all nested
documents. Here's a gist of the idea

Faceting by both document and nested document · GitHub

What I'm hoping for is to have each rating range facet have the min, max,
average, etc of the prices within the nested document of the matching
containing document.

Now that I look at it again at the nested facet documentation, I'm thinking
this isn't possible, but I'd loved to be proved wrong.

Cheers,
Dan

Okay, yeah, that makes sense. Kind of blows out the index size a bit, but it
works.

In theory, we can support this case for facets, though with a lot of more
coding... . Open an issue for this so we won't forget.

On Mon, Aug 8, 2011 at 1:47 AM, Dan Everton dan@iocaine.org wrote:

Okay, yeah, that makes sense. Kind of blows out the index size a bit, but
it works.