1. A method, in a data processing system, for evaluating an electronic document query, comprising: receiving a hierarchical query; separating the hierarchical query into a plurality of query legs; performing an index scan for evaluating the hierarchical query against at least one index of at least one hierarchically structured electronic document by processing a query leg on the at least one index of the at least one hierarchically structured electronic document to determine if a condition of the query leg is met by at least one node in the at least one index of the at least one hierarchically structured electronic document, wherein if at least one node in the at least one index of the at least one hierarchically structured electronic document satisfies the condition of the query leg, an entry in at least one hash table is populated with information regarding the at least one node; generating results of the hierarchical query based on content of the at least one hash table; and returning the results of the hierarchical query to an originator of the hierarchical query, wherein the at least one hash table comprises a BUILD hash table and a PROBE hash table, wherein the BUILD hash table is used to store document nodes matching a predicate of the query leg and to buffer document nodes satisfying extraction nodes of the query leg, and wherein the PROBE hash table stores document nodes satisfying predicates from query legs evaluated prior to a current query leg being evaluated.
1. A method, in a data processing system, for evaluating an electronic document query, comprising: receiving a hierarchical query; separating the hierarchical query into a plurality of query legs; performing an index scan for evaluating the hierarchical query against at least one index of at least one hierarchically structured electronic document by processing a query leg on the at least one index of the at least one hierarchically structured electronic document to determine if a condition of the query leg is met by at least one node in the at least one index of the at least one hierarchically structured electronic document, wherein if at least one node in the at least one index of the at least one hierarchically structured electronic document satisfies the condition of the query leg, an entry in at least one hash table is populated with information regarding the at least one node; generating results of the hierarchical query based on content of the at least one hash table; and returning the results of the hierarchical query to an originator of the hierarchical query, wherein the at least one hash table comprises a BUILD hash table and a PROBE hash table, wherein the BUILD hash table is used to store document nodes matching a predicate of the query leg and to buffer document nodes satisfying extraction nodes of the query leg, and wherein the PROBE hash table stores document nodes satisfying predicates from query legs evaluated prior to a current query leg being evaluated. 11. The method of claim 1 , wherein each query leg comprises one or more BUILD nodes and one or more PROBE nodes, wherein a query leg's BUILD node is a lowest common ancestor node between the query leg and its right neighboring query leg, and wherein a query leg's PROBE node is a lowest common ancestor node between the query leg and its left neighboring query leg.