8. A computer implemented method for performing a search of a plurality of documents for similarity to a query having multiple terms using an inverted index of the plurality of documents, comprising the sequential steps of: (a) searching the inverted index for each of the query terms and determining a number of occurrences of the query terms in a first document; (b) calculating a similarity score for the first document based on the number of occurrences of the query terms in the first document; (c) storing the first document's similarity score in a memory; (d) searching the inverted index for each of the query terms and determining a number of occurrences of the query terms in a subsequent document; (e) calculating a similarity score for the subsequent document based on the number of occurrences of the query terms in the subsequent document; (f) storing the subsequent document's similarity score in the memory when fewer than a predetermined number of similarity scores are stored in the memory; (g) comparing the subsequent document's similarity score to the similarity scores stored in the memory, deleting the lowest similarity score stored in the memory, and storing the subsequent document's similarity score in the memory when the subsequent document's similarity score is higher than the lowest similarity score stored in the memory and more than a predetermined number of similarity scores are stored in the memory; and (h) repeating steps (d) through (g) until a similarity score has been calculated for each of the plurality of documents.
11. The method of claim 8, wherein the query terms comprise images, and wherein the inverted index is an inverted index of images that occur in the plurality of documents.