Package com.atlassian.jira.search.lucene
Class NamedQueryCollector
java.lang.Object
org.apache.lucene.search.SimpleCollector
com.atlassian.jira.search.lucene.NamedQueryCollector
- All Implemented Interfaces:
org.apache.lucene.search.Collector,org.apache.lucene.search.LeafCollector
public class NamedQueryCollector
extends org.apache.lucene.search.SimpleCollector
A lucene collector that matches each document with a pre-defined set of named queries
- Since:
- 11.3
-
Constructor Summary
ConstructorsConstructorDescriptionNamedQueryCollector(org.apache.lucene.search.IndexSearcher searcher, Map<String, org.apache.lucene.search.Query> namedQueries) -
Method Summary
Modifier and TypeMethodDescriptionvoidcollect(int doc) protected voiddoSetNextReader(org.apache.lucene.index.LeafReaderContext context) getMatchingNamedQueries(int id) booleanMethods inherited from class org.apache.lucene.search.SimpleCollector
getLeafCollector, setScorer
-
Constructor Details
-
NamedQueryCollector
public NamedQueryCollector(org.apache.lucene.search.IndexSearcher searcher, Map<String, org.apache.lucene.search.Query> namedQueries) throws IOException- Throws:
IOException
-
-
Method Details
-
doSetNextReader
protected void doSetNextReader(org.apache.lucene.index.LeafReaderContext context) throws IOException - Overrides:
doSetNextReaderin classorg.apache.lucene.search.SimpleCollector- Throws:
IOException
-
collect
- Specified by:
collectin interfaceorg.apache.lucene.search.LeafCollector- Specified by:
collectin classorg.apache.lucene.search.SimpleCollector- Throws:
IOException
-
needsScores
public boolean needsScores() -
getMatchingNamedQueries
-