1. A computer-implemented method comprising: identifying a particular query term of an original search query; identifying a candidate synonym for the particular query term; accessing stored data that specifies, for a pair of terms that includes the particular query term and the candidate synonym of the particular query term, a confidence value for a non-adjacent query term of the original search query that is not adjacent to the particular query term in the original search query; determining that, in the stored data that specifies, for the pair of terms that includes the particular query term and the candidate synonym of the particular query term, the confidence value for the non-adjacent query term satisfies a threshold; and determining to revise the original search query to include the candidate synonym of the particular query term, based on determining that the confidence value for the non-adjacent query term satisfies the threshold.