Ads eligible to be served with a document (for example, because they are relevant to the document) may each be scored using a price parameter associated with the ad and an indication of relevancy of the ad to the document. The indication of relevancy of the ad to the document may be based on an ordinal ranking of a relevancy criteria of the document used to select the ad, and/or a value of a relevancy criteria of the document used to select the ad. The eligible ads may be determined by obtaining relevancy criteria for the document and selecting ads using at least some of the obtained relevancy criteria. The ads may be selected, and perhaps filtered, in a distributed manner.