1. A method performed by one or more computers, the method comprising: receiving a plurality of documents, the plurality of documents having an initial order; identifying local term relationships between terms in the plurality of documents, each local term relationship being a relationship between a pair of terms in a respective document; determining relationships among the documents in the plurality of documents based on the local term relationships and on the initial order of the documents, including selecting each document, in order of the initial order of the documents, and adding nodes representing terms in the selected document to a global term relationships graph and adding edges between nodes representing terms having a local term relationship in the selected document to the global term relationships graph; and determining a respective score for each document in the plurality of documents based on the document relationships.