The structure is three aggregations: a nested wrapping a filter wrapping a
nested. Checking the doc counts on these, I see that the outer two work as
expected: the doc count for the outer nested is the number of nested
"calls" documents, the doc count for the filter is the number of those
nested "calls" docs that pass the filter. But it appears that the inner
nested resets the buckets: it returns the number of inner nested "params"
documents across all "calls" docs, regardless of the filter.
The structure is three aggregations: a nested wrapping a filter wrapping a
nested. Checking the doc counts on these, I see that the outer two work as
expected: the doc count for the outer nested is the number of nested
"calls" documents, the doc count for the filter is the number of those
nested "calls" docs that pass the filter. But it appears that the inner
nested resets the buckets: it returns the number of inner nested "params"
documents across all "calls" docs, regardless of the filter.
The structure is three aggregations: a nested wrapping a filter wrapping
a nested. Checking the doc counts on these, I see that the outer two work
as expected: the doc count for the outer nested is the number of nested
"calls" documents, the doc count for the filter is the number of those
nested "calls" docs that pass the filter. But it appears that the inner
nested resets the buckets: it returns the number of inner nested "params"
documents across all "calls" docs, regardless of the filter.
I'm also running into this it is not what I expected. I tried parent/child
and got the same behavior. I expect the filtering to narrow down the
results with each filter. I filter on a child (or nested) that has
property=p then go back to aggregate on the parent and I get all the
results again as if the filter is not applied.
I can include sample data, mapping, and queries if someone wants to comment.
I'm trying to do clickstream analysis on session events and user actions.
The data models I am trying are where the session is the parent event with
user actions as the child (or nested) events. I've tried several different
models and have not found one that works well.
"Lastly, it is not possible to “cross reference” between nested documents.
One nested doc cannot “see” another nested doc’s properties. For example,
you are not able to filter on “A.name” but facet on “B.age”. You can get
around this by using include_in_root, which effectively copies the nested
docs into the root, but this get’s you back to the problems of inner
objects."
Perhaps this is our answer?
On Friday, October 24, 2014 3:31:11 PM UTC-7, Zennet Wheatcroft wrote:
I'm also running into this it is not what I expected. I tried parent/child
and got the same behavior. I expect the filtering to narrow down the
results with each filter. I filter on a child (or nested) that has
property=p then go back to aggregate on the parent and I get all the
results again as if the filter is not applied.
I can include sample data, mapping, and queries if someone wants to
comment.
I'm trying to do clickstream analysis on session events and user actions.
The data models I am trying are where the session is the parent event with
user actions as the child (or nested) events. I've tried several different
models and have not found one that works well.
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.