elasticsearch/elasticsearch — pull request #3212 by mattweber (2013-06-20 21:38:24+00:00)
Title: Optimize parent/child queries and filters if possible

This is for #3190. The main optimization is in has_child queries and filters by short-circuiting the parent processing once all known parents have been. Other small updates to has_child query/filter to not execute the internal children filter when we know there are going to be no hits (no parents found).