FieldPhraseList.WeightedPhraseInfo (Lucene 10.5.1 highlighter API)
Description: declaration: package: org.apache.lucene.search.vectorhighlight, class: FieldPhraseList, class: WeightedPhraseInfo

Package org.apache.lucene.search.vectorhighlight

# Class FieldPhraseList.WeightedPhraseInfo

java.lang.Object
org.apache.lucene.search.vectorhighlight.FieldPhraseList.WeightedPhraseInfo

All Implemented Interfaces:
  `Comparable<FieldPhraseList.WeightedPhraseInfo>`

Enclosing class:
  `FieldPhraseList`

public static class FieldPhraseList.WeightedPhraseInfo extends Object implements Comparable<FieldPhraseList.WeightedPhraseInfo>
Represents the list of term offsets and boost for some text

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `FieldPhraseList.WeightedPhraseInfo.Toffs`
  Term offsets (start + end)

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `WeightedPhraseInfo(Collection<FieldPhraseList.WeightedPhraseInfo> toMerge)`
  Merging constructor.
  `WeightedPhraseInfo(LinkedList<FieldTermStack.TermInfo> terms, float boost)`
  `WeightedPhraseInfo(LinkedList<FieldTermStack.TermInfo> terms, float boost, int seqnum)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `compareTo(FieldPhraseList.WeightedPhraseInfo other)`
  `boolean`
  `equals(Object obj)`
  `float`
  `getBoost()`
  `int`
  `getEndOffset()`
  `int`
  `getSeqnum()`
  `int`
  `getStartOffset()`
  `List<FieldTermStack.TermInfo>`
  `getTermsInfos()`
  `List<FieldPhraseList.WeightedPhraseInfo.Toffs>`
  `getTermsOffsets()`
  `String`
  `getText()`
  Text of the match, calculated on the fly.
  `int`
  `hashCode()`
  `boolean`
  `isOffsetOverlap(FieldPhraseList.WeightedPhraseInfo other)`
  `String`
  `toString()`

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

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

- ## Constructor Details

  - ### WeightedPhraseInfo

    public WeightedPhraseInfo(LinkedList<FieldTermStack.TermInfo> terms, float boost)

  - ### WeightedPhraseInfo

    public WeightedPhraseInfo(LinkedList<FieldTermStack.TermInfo> terms, float boost, int seqnum)

  - ### WeightedPhraseInfo

    public WeightedPhraseInfo(Collection<FieldPhraseList.WeightedPhraseInfo> toMerge)
    Merging constructor. Note that this just grabs seqnum from the first info.

- ## Method Details

  - ### getText

    public String getText()
    Text of the match, calculated on the fly. Use for debugging only.
    Returns:
      the text

  - ### getTermsOffsets

    public List<FieldPhraseList.WeightedPhraseInfo.Toffs> getTermsOffsets()
    Returns:
      the termsOffsets

  - ### getBoost

    public float getBoost()
    Returns:
      the boost

  - ### getTermsInfos

    public List<FieldTermStack.TermInfo> getTermsInfos()
    Returns:
      the termInfos

  - ### getStartOffset

    public int getStartOffset()

  - ### getEndOffset

    public int getEndOffset()

  - ### isOffsetOverlap

    public boolean isOffsetOverlap(FieldPhraseList.WeightedPhraseInfo other)

  - ### toString

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

  - ### getSeqnum

    public int getSeqnum()
    Returns:
      the seqnum

  - ### compareTo

    public int compareTo(FieldPhraseList.WeightedPhraseInfo other)
    Specified by:
      `compareTo` in interface `Comparable<FieldPhraseList.WeightedPhraseInfo>`

  - ### hashCode

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

  - ### equals

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