public class DefaultMatchHandler extends Object implements MatchHandler
Builds an array of collections of strings, where the array index is the document number and the collection contains the values for that term. In JIRA's terms, the array index is a key for looking up an issue and the collection contains the values assigned to the field we are matching against.
This array built here is a memory eating monster and we take special care to eat as little as possible. This matcher labours under the assumption that nearly all documents have single values for most terms, even in the case of multi-valued fields, such as component or fixVersion, most documents have only a single value, often the empty value, "-1".
We use a shared singleton for any single values and only build a mutable collection once we go past a single value. This has no performance cost even in the case where there are > 1 values, aside from the size() == 1 comparison.
|Constructor and Description|
|Modifier and Type||Method and Description|
public void handleMatchedDocument(int doc, String termValue)
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.
Copyright © 2002-2017 Atlassian. All Rights Reserved.