1. A method in a computer system for determining relevance of a query term to a document, the method comprising: identifying spans of query terms within the document; calculating a relevance for the query term for each span that includes the query term; and aggregating the calculated relevance for the query term for each span into the relevance of the query term to the document.