Package org.apache.lucene.search.suggest.document

# Class TopSuggestDocs.SuggestScoreDoc

java.lang.Object
org.apache.lucene.search.ScoreDoc
org.apache.lucene.search.suggest.document.TopSuggestDocs.SuggestScoreDoc

All Implemented Interfaces:
  `Comparable<TopSuggestDocs.SuggestScoreDoc>`

Enclosing class:
  `TopSuggestDocs`

public static class TopSuggestDocs.SuggestScoreDoc extends ScoreDoc implements Comparable<TopSuggestDocs.SuggestScoreDoc>
`ScoreDoc` with an additional CharSequence key

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final CharSequence`
  `context`
  Context for the completion
  `final CharSequence`
  `key`
  Matched completion key

  ### Fields inherited from class org.apache.lucene.search.ScoreDoc

  `COMPARATOR, doc, score, shardIndex`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SuggestScoreDoc(int doc, CharSequence key, CharSequence context, float score)`
  Creates a SuggestScoreDoc instance

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `compareTo(TopSuggestDocs.SuggestScoreDoc o)`
  `boolean`
  `equals(Object other)`
  `int`
  `hashCode()`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### key

    public final CharSequence key
    Matched completion key

  - ### context

    public final CharSequence context
    Context for the completion

- ## Constructor Details

  - ### SuggestScoreDoc

    public SuggestScoreDoc(int doc, CharSequence key, CharSequence context, float score)
    Creates a SuggestScoreDoc instance
    Parameters:
      `doc` - document id (hit)
      `key` - matched completion
      `score` - weight of the matched completion

- ## Method Details

  - ### compareTo

    public int compareTo(TopSuggestDocs.SuggestScoreDoc o)
    Specified by:
      `compareTo` in interface `Comparable<TopSuggestDocs.SuggestScoreDoc>`

  - ### equals

    public boolean equals(Object other)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `ScoreDoc`