Class SnippetFormatter
java.lang.Object
org.apache.lucene.search.uhighlight.PassageFormatter
com.apple.foundationdb.record.lucene.highlight.SnippetFormatter
@API(INTERNAL)
public class SnippetFormatter
extends org.apache.lucene.search.uhighlight.PassageFormatter
A
PassageFormatter which keeps a whole number of words
before and after matching text entries to provide context, and inserts ellipses in between
matched strings to form a summarized text.
If you want a formatter which returns the whole string, use WholeTextFormatter instead.
-
Constructor Summary
ConstructorsConstructorDescriptionSnippetFormatter(String fieldName, Supplier<BreakIterator> breakIterator, int snippetSize) -
Method Summary
-
Constructor Details
-
SnippetFormatter
-
-
Method Details
-
format
- Specified by:
formatin classorg.apache.lucene.search.uhighlight.PassageFormatter
-