EFFICIENT EVALUATION OF XQUERY AND XPATH FULL TEXT EXTENSION
First Claim
1. A method comprising the machine-implemented steps of:
- receiving an XML query that conforms to a specification that extends one or more XML-based query languages to include full-text search capabilities;
compiling the XML query to generate a tree that comprises a plurality of nodes, wherein each node in the plurality of nodes corresponds to a full-text operator defined by the specification;
before evaluating any of the nodes in the tree;
determining a size of the execution state for each node of the plurality of nodes; and
allocating, based at least in part on the size of the execution state for each node of the plurality of nodes, a portion of memory for said each node; and
fully evaluating the tree to determine a final result without de-allocating or allocating memory for each node of the plurality of nodes.
1 Assignment
0 Petitions
Accused Products
Abstract
Techniques are provided for efficiently evaluating XML queries that conform to an extension of an XML language (e.g., XQuery or XPath). The extension allows XML queries to have full-text search capabilities. Such an XML query is compiled to generate a tree of nodes that correspond to one or more conditions in the full-text portion of the query. In one technique, the amount of memory for the execution state of the tree is determined at compile time and allocated only once throughout execution of the query. In another technique, to ensure at most a single scan of a document, all the words or phrases in the full-text portion of an XML query are located before any of the other conditions in the full-text portion are evaluated. In another technique, the elements of the full-text portion of an XML query are analyzed to determine, based at least in part on cost, which evaluation strategy, of a plurality of evaluation strategies, should be employed.
-
Citations
24 Claims
-
1. A method comprising the machine-implemented steps of:
-
receiving an XML query that conforms to a specification that extends one or more XML-based query languages to include full-text search capabilities; compiling the XML query to generate a tree that comprises a plurality of nodes, wherein each node in the plurality of nodes corresponds to a full-text operator defined by the specification; before evaluating any of the nodes in the tree; determining a size of the execution state for each node of the plurality of nodes; and allocating, based at least in part on the size of the execution state for each node of the plurality of nodes, a portion of memory for said each node; and fully evaluating the tree to determine a final result without de-allocating or allocating memory for each node of the plurality of nodes. - View Dependent Claims (2, 3, 4, 5, 13, 14, 15, 16, 17)
-
-
6. A method comprising the machine-implemented steps of:
-
receiving an XML query that conforms to a specification that extends one or more XML-based query languages to include full-text search capabilities, wherein the XML query specifies a search context and a full-text selection expression; compiling the XML query to generate a tree that comprises a plurality of nodes that includes a plurality of leaf nodes, wherein each node in the plurality of nodes corresponds to a full-text operator defined by the specification, wherein each of the plurality of leaf node corresponds to a different word or phrase in the full-text selection expression; while evaluating the tree; evaluating each of the plurality of leaf nodes before evaluating any parent node of any of the plurality of leaf nodes; and in response to identifying at least one occurrence of each word or phase, corresponding to each of the plurality of leaf nodes, in an item of the search context, evaluating one or more parent nodes of the plurality of leaf nodes. - View Dependent Claims (7, 8, 18, 19, 20)
-
-
9. A method comprising the machine-implemented steps of:
-
receiving an XML query that conforms to a specification that extends one or more XML-based query languages to include full-text search capabilities, wherein the XML-based query specifies a search context and a full-text selection expression; determining a first selectivity value that corresponds to the selectivity of the search context; determining a second selectivity value that corresponds to the selectivity of the full-text selection expression; determining, based at least in part on the first and second selectivity values, a particular evaluation strategy from a plurality of evaluation strategies; and executing the XML query based, at least in part, on the particular evaluation strategy. - View Dependent Claims (10, 11, 12, 21, 22, 23, 24)
-
Specification