Class TopSuggestDocsCollector

java.lang.Object
org.apache.lucene.search.SimpleCollector
org.apache.lucene.search.suggest.document.TopSuggestDocsCollector
All Implemented Interfaces:
Collector, LeafCollector

public class TopSuggestDocsCollector extends SimpleCollector
Collector that collects completion and score, along with document id

Non scoring collector that collect completions in order of their pre-computed scores.

NOTE: One document can be collected multiple times if a document is matched for multiple unique completions for a given query

Subclasses should only override collect(int, CharSequence, CharSequence, float).

NOTE: SimpleCollector.setScorer(org.apache.lucene.search.Scorable) and collect(int) is not used

WARNING: This API is experimental and might change in incompatible ways in the next release.
  • Field Details

    • docBase

      protected int docBase
      Document base offset for the current Leaf
  • Constructor Details

    • TopSuggestDocsCollector

      public TopSuggestDocsCollector(int num, boolean skipDuplicates)
      Sole constructor

      Collects at most num completions with corresponding document and weight

  • Method Details