Patent ID: 8606627

Claim:
A system that facilitates selecting advertisements that match a search query, comprising: a processor; and a memory that comprises a plurality of components that are executed by the processor, the components comprising: an advertisement receiver component that receives a plurality of bid phrases and associated advertisement data; an optimization component that stores the plurality of received bid phrases in one or more data nodes of an associated data structure, wherein for a received bid phrase amongst the plurality of bid phrases, the optimization component: determines that a data node includes a stored bid phrase that comprises a superset of words included in the received bid phrase; determines a cost of storing the received bid phrase in the data node based upon an evaluation of a cost model; and stores the received bid phrase in either the data node or a disparate data node based at least in part upon the cost; a search query receiver component that receives a search query including keywords; and a match component that uses the associative data structure to identify in the associative data structure at least one data node that is associated in the associative data structure with respective unique keys corresponding to respective one or more hashes of combinations of the keywords in the search query, wherein for each identified data node, the match component selects advertisements associated with bid phrases stored in the identified data node that respectively only include keywords included in the search query.