1. A computer-implemented method comprising: aligning each image in a collection of near-duplicate images to a common coordinate frame; determining one or more visual words in the common coordinate frame for each of the images in the collection of near-duplicate images; determining a union of visual words, wherein the union of visual words comprises the one or more visual words determined in the common coordinate frame; and adding a posting list item that identifies the collection of near-duplicate images to one or more corresponding posting lists, wherein each posting list corresponds to one of the determined visual words, and wherein each posting list identifies one or more collections of near-duplicate images whose union of determined visual words have the particular visual word.