KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > lucene > search > SortComparatorSource


1 package org.apache.lucene.search;
2
3 import org.apache.lucene.index.IndexReader;
4 import java.io.IOException JavaDoc;
5 import java.io.Serializable JavaDoc;
6
7 /**
8  * Expert: returns a comparator for sorting ScoreDocs.
9  *
10  * <p>Created: Apr 21, 2004 3:49:28 PM
11  *
12  * @author Tim Jones
13  * @version $Id: SortComparatorSource.java 150348 2004-05-19 23:05:27Z tjones $
14  * @since 1.4
15  */

16 public interface SortComparatorSource
17 extends Serializable JavaDoc {
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 JavaDoc fieldname)
27   throws IOException JavaDoc;
28 }
Popular Tags