11. A computer-readable storage medium containing instructions for controlling a computer system to identify spans of query terms of a query within a document for use in determining relevance of documents to the query, by a method comprising: receiving from a user a query of query terms; for each of a plurality of documents, identifying query terms within the document; identifying sequences of query terms wherein a sequence includes no repeated occurrences of a query term, wherein at least one sequence includes at least three query terms, wherein a distance between adjacent query terms within a sequence is less than a threshold distance, and wherein the distance between two query terms is based on the number of non-query terms between the two query terms wherein a sequence is a span of query terms; and for each of the identified query terms of the document, for each span that contains the query term, increasing relevance of the document to the received query by a span relevance of the query term that is based on the number of query terms within the span and an inverse of the span width, wherein the relevance of the document is based on replacing a term frequency with a query term relevance derived from the span relevance in an equation for calculating relevance of a document to a query; and displaying an indication of documents in an order based on the relevance of the documents to the received query.
12. The computer-readable storage medium of claim 11 wherein when a sequence of query terms is adjacent to two occurrences of the same query term, including within the sequence the query term that is closest to a query term of the sequence.