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

Package org.apache.lucene.search.vectorhighlight

# Class SingleFragListBuilder

java.lang.Object
org.apache.lucene.search.vectorhighlight.SingleFragListBuilder

All Implemented Interfaces:
  `FragListBuilder`

public class SingleFragListBuilder extends Object implements FragListBuilder
An implementation class of `FragListBuilder` that generates one `FieldFragList.WeightedFragInfo` object. Typical use case of this class is that you can get an entire field contents by using both of this class and `SimpleFragmentsBuilder`.

     FastVectorHighlighter h = new FastVectorHighlighter( true, true,
       new SingleFragListBuilder(), new SimpleFragmentsBuilder() );

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SingleFragListBuilder()`

- ## Method Summary

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

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

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

- ## Constructor Details

  - ### SingleFragListBuilder

    public SingleFragListBuilder()

- ## Method Details

  - ### createFieldFragList

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