01 package gate.creole.annic.apache.lucene.search;
02
03 import gate.creole.annic.apache.lucene.index.IndexReader;
04 import java.io.IOException;
05 import java.io.Serializable;
06
07 /**
08 * Expert: returns a comparator for sorting ScoreDocs.
09 *
10 * <p>Created: Apr 21, 2004 3:49:28 PM
11 *
12 * @author Tim Jones
13 * @version $Id: SortComparatorSource.java 529 2004-10-05 11:55:26Z niraj $
14 * @since 1.4
15 */
16 public interface SortComparatorSource
17 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 }
|