lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romi <>
Subject FieldComparatorSource
Date Mon, 13 Dec 2010 10:47:34 GMT

   I am upgrading my project from Lucene2.4 to Lucene3.0.2.
I used FieldComparatorSource in place of SortComparatorSource and
FieldComparator in place of ScoreDocComparator. My problem is:

1. I need to implement abstract class FieldComparatorSource's method
newComparator() that is different from Lucene2.4(SortComparatorSource ).
Would u please give me some example how to use it.

The previous that was used in my project is :

   public ScoreDocComparator newComparator(IndexReader reader,
                                            String fieldname)
            throws IOException {
        NameFactory factory = NameFactoryImpl.getInstance();
        try {
            return new Comparator(reader,
        } catch (IllegalNameException e) {
            throw Util.createIOException(e);

View this message in context:
Sent from the Lucene - General mailing list archive at

View raw message