1. A method comprising: receiving an XML query that conforms to an XML-based query language that includes 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; 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; wherein the method is performed by one or more computing devices.