Patent ID: 7822771

Claim:
A computer-implemented method for providing a search query residing in a non-transitory computer-readable storage medium and executing on a computer, comprising: providing, by the computer, an Application Programming Interface (API) for receiving a search constraint and a control field identifier; providing, by the computer, a search generating module interfaced to the API for automatically generating a search query from the search constraint, the search constraint defines an operand and an operator for the search query being generated and the control field identifier defines a control field of a data store from which search results obtained from executing the search query are to be filtered via a join and the control field identifier is separate and apart from the search constraint; executing the search query to produce records from the data store, the records representing the search results that satisfy the search constraint and the search results are initially over inclusive indicating that initially there are more of the search results than are necessary to satisfy the search query, the records are then filtered using a control field value assigned to the control field identifier by joining those records from the search results that have identical values as that which is assigned to the control field value to reduce the search results by producing second records, each second record having control field values for the control field identifier that are identical, the search query modified to include a filter that performs the filtering on the records to produce the second records; and interfacing, by the computer, the records automatically after the search query is executed with a marketing campaign module to generate a customer segmentation population based on a marketing campaign's search constraint representing an instance of the search constraint.