com.atlassian.jira.issue.search.parameters.lucene.sort
Class SingleValueMatchHandler
java.lang.Object
com.atlassian.jira.issue.search.parameters.lucene.sort.SingleValueMatchHandler
- All Implemented Interfaces:
- MatchHandler
@ExperimentalApi
public class SingleValueMatchHandler
- extends Object
- implements MatchHandler
A match handler that assumes all values it will only ever see one
value per document. This allows it to optimise the storage somewhat
by avoiding the use of more complicated data structures to contain
the values.
- Since:
- v5.1
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SingleValueMatchHandler
public SingleValueMatchHandler(int maxdoc)
handleMatchedDocument
public void handleMatchedDocument(int doc,
String termValue)
- Description copied from interface:
MatchHandler
- Invoked by
JiraLuceneFieldFinder.getMatches(org.apache.lucene.index.IndexReader, String, MatchHandler)
for each field value for each document. The calls will be made in
order of increasing term values, with the document identifiers supplied
in an arbitrary order.
- Specified by:
handleMatchedDocument
in interface MatchHandler
- Parameters:
doc
- the document identifier for the document that contains the term. In
JIRA, this indentifies a particular issuetermValue
- the value assigned to the term. In JIRA, this is the value
assigned to the field.
getResults
public List<String>[] getResults()
- Get the results from the match handler. Every element is guaranteed
to be either null (meaning that document had no value for the
field) or an immutable List containing exactly one value
(
Collections.singletonList(Object)
).
- Returns:
- the resulting matches
Copyright © 2002-2013 Atlassian. All Rights Reserved.