Patent ID: 8549006

Claim:
A method of searching a document having nested-structure document-specific markup, comprising: receiving, by a processor, a query that designates a phrase to be matched in a phrase matching process; deriving, by the processor, query-specific indices based on query-independent indices that were created specific to the document, wherein the query-independent indices were created comprising forming the query-independent indices by first receiving, for a word in the document, a first position in the document, and then by indicating whether or not the word is present at that first position, and for a tag in the document, a second position in the document, and then by indicating whether or not the tag is present at that second position; and performing, by the processor, the phrase matching process using the query-specific indices on the document having the nested-structure document-specific markup, wherein the query-independent indices were created further comprising: labeling elements in the document with intervals, wherein: for markup tags, the intervals are defined in terms of a starting index number associated with an opening markup tag and an ending index number associated with a closing markup tag that corresponds to the opening markup tag, and for a single word, the intervals are defined in terms of a single index number associated with the single word.