9. A system comprising: one or more computers and one or more storage devices storing instructions that are operable, when executed by the one or more computers, to cause the one or more computers to perform operations comprising: storing, in an index associated with a document, a particular term that occurs in the document, wherein the particular term comprises quantity m words, wherein the quantity m is greater than 1; identifying a substitute term of the particular term, wherein the substitute term comprises quantity n separate words, and wherein the quantity n is greater than 1; and in response to identifying the substitute term of the particular term, storing, in the index associated with the document, (i) each of the quantity n words of the substitute term of the particular term as a separate index entry, and (ii) for each respective index entry, data indicating the quantity m and data indicating a value between 1 and n inclusive, wherein the value reflects an order of the respective word within the quantity n words of the substitute term.
12. The system of claim 9 , further comprising: storing, in the index associate with the document, information indicating that the substitute term of the particular term (i) is a substitute term of the particular term, or (ii) is not a term that occurs in the document.