1. A method comprising: receiving, at a computing device, a query template comprising a request for web pages from a data set that resides in a cloud comprising a cluster of computing devices, said query template defined by a user associated with a client computer; optimizing, via the computing device, the query template to segment the query template into an offline phase and an online phase, the offline phase comprising a query segment with no parameters, the online phase comprising a query segment with parameters; executing, via the computing device, the offline phase in accordance with the cluster of computing devices of the cloud to build one or more indexes; executing, via the computing device, the online phase respective to the client computer at an interactive speed, said client computer comprising a space constraint, said online phase execution comprises negotiating with said client computer via sampling the query segment with parameters at said interactive speed, wherein the building of the one or more indexes is based on the space constraint associated with the client computer; and sending, via the computing device, the one or more indexes based on the space constraint to the client computer.