The subject invention pertains to database reverse query matching. A text
document can be received and analyzed to determine which, if any, queries
the document matches. To enable such functionality, a number of
intermediate structures such as tables are generated in accordance with
designated queries. In particular, a canonical table can be generated
that specifies the expressions or phrases as well as match rules.
Furthermore, a Boolean table can be generated that specifies the Boolean
relationship of expressions in canonical table. A match component or
methodology can match text phrases to query phrases identified by the
canonical table. An evaluation component or related methodology can
subsequently utilize the Boolean table to determine if the preliminary
phrase matches match the query logic.