I'm trying to do a, what I thought was simple, nested in nested query. For a document, PageStat, I have "by_goals" nested document that has a by_sources nested document inside it. I'm just trying to aggregate for a "PageStat" the source_id counts by goal for that page by day.
According to SO, this should work. However, I haven't manage to get this done. 4 frigging days.
OK.. there is a by_source on the root.. and a by_source that is below the by_goal.. (nested in nested). This is the one I'm querying.. not the root object. Given that, is that what I should still do?
I think your problem is that your paths need to be changed to be relative to your root object. So to reference the by_source which is below by_goal in your inner nested aggregation you need to specify the path as by_goal.by_source, the same with the paths in your terms aggregations
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.