A system and method track changes to a document and analyze the changes to
the document against a set of predefined queries without re-analyzing the
entire document. Hence, after a document has been processed in the system
(i.e., had its terms matched against the set of predefined queries), only
a small subset of the document needs to be reprocessed and analyzed after
changes (i.e., edits) are made. The analysis of the small subset is
accomplished by maintaining an incremental-results data set for each
document. The incremental-results data set is much smaller than the actual
document, only comprising a set of unique words found in a document. After
a document is changed, only the words deleted or added to the changed
portion are used to update the incremental-results data set.