There are provided methods, computer program products, and systems for
indexing a data stream. A method for indexing a data stream having
attribute values includes the steps of parsing the data stream, and
forming an index of tuples for a subset of attribute values of the data
stream. The index is configured for retrieving the top-K tuples that
optimize linearly weighted sums of at least some of the attribute values
in the subset.