com.atlassian.jira.issue.search.parameters.lucene.sort
Interface IssueSortComparator

All Known Implementing Classes:
DefaultIssueSortComparator

public interface IssueSortComparator

A means of comparing two issue documents in an index, using Lucene. Although implementations of this interface are free to look up the issue from the database for sorting, this is an order of magnitude slower than accessing the index directly.


Method Summary
 int compare(Issue issue1, Issue issue2)
          Compare 2 issues.
 Issue getIssueFromDocument(org.apache.lucene.document.Document document)
          Get an Issue object from a Lucene Document
 

Method Detail

compare

int compare(Issue issue1,
            Issue issue2)
Compare 2 issues.

Parameters:
issue1 - First Issue
issue2 - Second Issue
Returns:
-1,0 or 1 depending upon this comparators determination if issue 1 should sort before, equal to or after issue 2.

getIssueFromDocument

Issue getIssueFromDocument(org.apache.lucene.document.Document document)
Get an Issue object from a Lucene Document

Parameters:
document - A lucene document, that must be an Issue document
Returns:
An Issue Object


Copyright © 2002-2013 Atlassian. All Rights Reserved.