1 package org.apache.lucene.search;2 3 import org.apache.lucene.index.IndexReader;4 import java.io.IOException ;5 import java.io.Serializable ;6 7 /**8 * Expert: returns a comparator for sorting ScoreDocs.9 *10 * <p>Created: Apr 21, 2004 3:49:28 PM11 * 12 * @author Tim Jones13 * @version $Id: SortComparatorSource.java 150348 2004-05-19 23:05:27Z tjones $14 * @since 1.415 */16 public interface SortComparatorSource17 extends Serializable {18 19 /**20 * Creates a comparator for the field in the given index.21 * @param reader Index to create comparator for.22 * @param fieldname Field to create comparator for.23 * @return Comparator of ScoreDoc objects.24 * @throws IOException If an error occurs reading the index.25 */26 ScoreDocComparator newComparator (IndexReader reader, String fieldname)27 throws IOException ;28 }