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 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:
      doSetNextReader in class org.apache.lucene.search.SimpleCollector
      Throws:
      IOException
    • collect

      public void collect(int doc) throws IOException
      Specified by:
      collect in interface org.apache.lucene.search.LeafCollector
      Specified by:
      collect in class org.apache.lucene.search.SimpleCollector
      Throws:
      IOException
    • needsScores

      public boolean needsScores()
    • getMatchingNamedQueries

      public List<String> getMatchingNamedQueries(int id)