com.atlassian.jira.issue.search.parameters.lucene.sort
Class DocumentSortComparatorSource

java.lang.Object
  extended by com.atlassian.jira.issue.search.parameters.lucene.sort.DocumentSortComparatorSource
All Implemented Interfaces:
java.io.Serializable, org.apache.lucene.search.SortComparatorSource

public class DocumentSortComparatorSource
extends java.lang.Object
implements org.apache.lucene.search.SortComparatorSource

This Sort Comparator loops through each document, and calls SortComparator.compare(org.apache.lucene.index.IndexReader,int,int) for each document it encounters.

Whilst slower than the MappedSortComparator, it allows for less memory overhead, and also allows for comparisons to be made

See Also:
Serialized Form

Constructor Summary
DocumentSortComparatorSource(SortComparator sortComparator)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 org.apache.lucene.search.ScoreDocComparator newComparator(org.apache.lucene.index.IndexReader indexReader, java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentSortComparatorSource

public DocumentSortComparatorSource(SortComparator sortComparator)
Method Detail

newComparator

public org.apache.lucene.search.ScoreDocComparator newComparator(org.apache.lucene.index.IndexReader indexReader,
                                                                 java.lang.String s)
                                                          throws java.io.IOException
Specified by:
newComparator in interface org.apache.lucene.search.SortComparatorSource
Throws:
java.io.IOException

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2002-2010 Atlassian. All Rights Reserved.