Patent ID: 7664728

Claim:
A method comprising: receiving an input, by a computer system executing an inverse query engine, wherein the input comprises a plurality of characters; grouping, by the computer system, the plurality of characters into one or more elemental language units; breaking, by the computer system, the one or more elemental language units into one or more constituent parts; generating, by the computer system, opcodes from the one or more elemental language units and from the one or more constituent parts, wherein the language units have been parsed and compiled into opcodes; merging, by the computer system, the opcodes into an opcode tree comprising opcode nodes and branch nodes, wherein there are no opcodes added to the opcode tree during an active merging; evaluating, by the computer system, the input against multiple queries, wherein multiple queries comprising Xpath queries, by evaluating common query expressions of the multiple queries in parallel, at the same time, wherein the opcodes common to one or more queries are executed only once; traversing, by the computer system, the opcode tree of hierarchical nature that includes a plurality of opcode nodes which together define opcodes that should be executed to evaluate a plurality of queries, and wherein a tree segment in a shared path represents an opcode block prefix that is common to two or more queries; identifying, by the computer system, a branch node including a number of branches, wherein a literal comparison is performed for each branch; applying, by the computer system, an optimization algorithm when the number of branches of the branch node is above a specified number, wherein the optimization algorithm combines the literal comparisons of each of the branches into an indexed literal branch opcode object; executing, by the computer system, each of the opcode nodes in the opcode tree as each opcode node is encountered in the traversal to evaluate the plurality of queries against the input; indexing, by the computer, branch opcodes to provide a framework for insertion of indexing techniques that are customized to a type of comparison; maintaining, by the computer system, an opcode tree copy that is used during query processing by the opcode tree, wherein operations may be undertaken on the opcode three without interfering with the query processing; updating, by the computer system, the opcode tree, wherein the opcode nodes are merged into or removed from the opcode tree while the opcode tree copy is used for query processing; wherein a relationship between the opcodes and the opcode tree is embedded in the opcodes that are created when a query is compiled; determining, by the computer system, that the number of branches of the branch node is below the specified number; and modifying, by the computer system, the indexed literal branch opcode object into a generic branch opcode object.