@ExperimentalApi public class

SingleValueMatchHandler

extends Object
implements MatchHandler
java.lang.Object
   ↳ com.atlassian.jira.issue.search.parameters.lucene.sort.SingleValueMatchHandler

@ExperimentalApi

This class is considered usable by external developers but its contracts have not stabilized.

Experimental APIs may be changed at any time before being marked @Internal or @PublicApi.

Class Overview

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.

Summary

Public Constructors
SingleValueMatchHandler(int maxdoc)
Public Methods
List[]<String> getResults()
Get the results from the match handler.
void handleMatchedDocument(int doc, String termValue)
Invoked by getMatches(org.apache.lucene.index.IndexReader, String, MatchHandler) for each field value for each document.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.issue.search.parameters.lucene.sort.MatchHandler

Public Constructors

public SingleValueMatchHandler (int maxdoc)

Public Methods

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 (singletonList(Object)).

Returns
  • the resulting matches

public void handleMatchedDocument (int doc, String termValue)

Invoked by 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.

Parameters
doc the document identifier for the document that contains the term. In JIRA, this indentifies a particular issue
termValue the value assigned to the term. In JIRA, this is the value assigned to the field.