Class LimitedPrefixSearchHitCollector

java.lang.Object
org.apache.lucene.search.SimpleCollector
com.atlassian.jira.issue.statistics.util.LimitedPrefixSearchHitCollector
All Implemented Interfaces:
org.apache.lucene.search.Collector, org.apache.lucene.search.LeafCollector

public class LimitedPrefixSearchHitCollector extends org.apache.lucene.search.SimpleCollector
A field hit collector to retrieve all the terms matching a certain prefix provided.
Since:
10.2
  • Constructor Details

    • LimitedPrefixSearchHitCollector

      public LimitedPrefixSearchHitCollector(String fieldId, String prefix, Set<String> exclude, int limit)
  • Method Details

    • getResults

      public Set<String> getResults()
    • collect

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

      protected void doSetNextReader(org.apache.lucene.index.LeafReaderContext context) throws IOException
      Overrides:
      doSetNextReader in class org.apache.lucene.search.SimpleCollector
      Throws:
      IOException
    • needsScores

      public boolean needsScores()