This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###Changes: | |
-Added "include_in_root" for each nested object. | |
-Removed the "nested" params from the last facet | |
This basically copies the nested doc into the root doc. You then reference the root "inner object" rather than the "nested object" to get the data. Be careful though, this breaks down if you have multiple nested docs that share the same name (e.g. array of nested), since the facet will operate on the entire array instead of individual ones. | |
See this thread for more info: https://groups.google.com/d/topic/elasticsearch/pjoNmosdCPs/discussion | |