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

Package org.apache.lucene.search.vectorhighlight

# Class WeightedFragListBuilder

java.lang.Object
org.apache.lucene.search.vectorhighlight.BaseFragListBuilder
org.apache.lucene.search.vectorhighlight.WeightedFragListBuilder

All Implemented Interfaces:
  `FragListBuilder`

public class WeightedFragListBuilder extends BaseFragListBuilder
A weighted implementation of `FragListBuilder`.

- ## Field Summary

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

  `MARGIN_DEFAULT, MIN_FRAG_CHAR_SIZE_FACTOR`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `WeightedFragListBuilder()`
  `WeightedFragListBuilder(int margin)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `FieldFragList`
  `createFieldFragList(FieldPhraseList fieldPhraseList, int fragCharSize)`
  create a FieldFragList.

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

  `acceptPhrase, createFieldFragList`

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

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

- ## Constructor Details

  - ### WeightedFragListBuilder

    public WeightedFragListBuilder()

  - ### WeightedFragListBuilder

    public WeightedFragListBuilder(int margin)

- ## Method Details

  - ### createFieldFragList

    public FieldFragList createFieldFragList(FieldPhraseList fieldPhraseList, int fragCharSize)
    Description copied from interface: `FragListBuilder`
    create a FieldFragList.
    Parameters:
      `fieldPhraseList` - FieldPhraseList object
      `fragCharSize` - the length (number of chars) of a fragment
    Returns:
      the created FieldFragList object