1. A method for indexing a data stream having attribute values, comprising: parsing the data stream; and forming an index of tuples for a subset of attribute values of the data stream, the index being configured for retrieving top-K tuples that optimize linearly weighted sums of at least some of the attribute values in the subset.