Skip to content

Instantly share code, notes, and snippets.

Zachary Tong polyfractal

Block or report user

Report or block polyfractal

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:4947188
###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
You can’t perform that action at this time.