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

Package org.apache.lucene.search.vectorhighlight

# Class ScoreOrderFragmentsBuilder

java.lang.Object
org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder
org.apache.lucene.search.vectorhighlight.ScoreOrderFragmentsBuilder

All Implemented Interfaces:
  `FragmentsBuilder`

public class ScoreOrderFragmentsBuilder extends BaseFragmentsBuilder
An implementation of FragmentsBuilder that outputs score-order fragments.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `ScoreOrderFragmentsBuilder.ScoreComparator`
  Comparator for `FieldFragList.WeightedFragInfo` by boost, breaking ties by offset.

- ## Field Summary

  ### Fields inherited from class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

  `COLORED_POST_TAGS, COLORED_PRE_TAGS, postTags, preTags`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ScoreOrderFragmentsBuilder()`
  a constructor.
  `ScoreOrderFragmentsBuilder(String[] preTags, String[] postTags)`
  a constructor.
  `ScoreOrderFragmentsBuilder(String[] preTags, String[] postTags, BoundaryScanner bs)`
  `ScoreOrderFragmentsBuilder(BoundaryScanner bs)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<FieldFragList.WeightedFragInfo>`
  `getWeightedFragInfoList(List<FieldFragList.WeightedFragInfo> src)`
  Sort by score the list of WeightedFragInfo

  ### Methods inherited from class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

  `createFragment, createFragment, createFragments, createFragments, discreteMultiValueHighlighting, getFields, getFragmentSource, getFragmentSourceMSO, getMultiValuedSeparator, getPostTag, getPostTag, getPreTag, getPreTag, isDiscreteMultiValueHighlighting, makeFragment, setDiscreteMultiValueHighlighting, setMultiValuedSeparator`

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ScoreOrderFragmentsBuilder

    public ScoreOrderFragmentsBuilder()
    a constructor.

  - ### ScoreOrderFragmentsBuilder

    public ScoreOrderFragmentsBuilder(String[] preTags, String[] postTags)
    a constructor.
    Parameters:
      `preTags` - array of pre-tags for markup terms.
      `postTags` - array of post-tags for markup terms.

  - ### ScoreOrderFragmentsBuilder

    public ScoreOrderFragmentsBuilder(BoundaryScanner bs)

  - ### ScoreOrderFragmentsBuilder

    public ScoreOrderFragmentsBuilder(String[] preTags, String[] postTags, BoundaryScanner bs)

- ## Method Details

  - ### getWeightedFragInfoList

    public List<FieldFragList.WeightedFragInfo> getWeightedFragInfoList(List<FieldFragList.WeightedFragInfo> src)
    Sort by score the list of WeightedFragInfo
    Specified by:
      `getWeightedFragInfoList` in class `BaseFragmentsBuilder`