Class CustomPassageFormatter
- java.lang.Object
-
- org.apache.lucene.search.uhighlight.PassageFormatter
-
- org.apache.lucene.search.uhighlight.CustomPassageFormatter
-
public class CustomPassageFormatter extends org.apache.lucene.search.uhighlight.PassageFormatter
Custom passage formatter that allows us to: 1) extract different snippets (instead of a single big string) together with their scores (Snippet
) 2) use theEncoder
implementations that are already used with the other highlighters
-
-
Constructor Summary
Constructors Constructor Description CustomPassageFormatter(java.lang.String preTag, java.lang.String postTag, org.apache.lucene.search.highlight.Encoder encoder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Snippet[]
format(org.apache.lucene.search.uhighlight.Passage[] passages, java.lang.String content)
-
-
-
Method Detail
-
format
public Snippet[] format(org.apache.lucene.search.uhighlight.Passage[] passages, java.lang.String content)
- Specified by:
format
in classorg.apache.lucene.search.uhighlight.PassageFormatter
-
-