1. A computer implemented method implemented in a data processing apparatus, comprising: receiving a query from a user device; segmenting, by a data processing apparatus, the query into query components, each query component being a term in the query; accessing, by the data processing apparatus, a keyword hash map for a plurality of keywords corresponding to a plurality of filtering terms, wherein at least one of the filtering terms includes only one component term, and at least one of the filtering terms includes a plurality of component terms in ordinal positions, each keyword being one of the component terms and being mapped to one or more corresponding hashes in the hash map, and each corresponding hash having a corresponding level and a corresponding status, wherein each level corresponds to an ordinal position of its corresponding component term in a query and wherein each status designates its corresponding component term in the hash map as one of a filtering term or unfiltered term; comparing the query components to the keyword hash map; and determining that the query includes a filtering term when the query components map to component terms in the keyword hash map for which a last query component of a term in the query maps to a component term in the keyword hash map having a status of a filtering term.