Class NullFragmenter
java.lang.Object
org.apache.lucene.search.highlight.NullFragmenter
- All Implemented Interfaces:
Fragmenter
Fragmenter implementation which does not fragment the text. This is useful for
highlighting the entire content of a document or field.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanTest to see if this token from the stream should be held in a new TextFragment.voidstart(String s, TokenStream tokenStream) Initializes the Fragmenter.
-
Constructor Details
-
NullFragmenter
public NullFragmenter()
-
-
Method Details
-
start
Description copied from interface:FragmenterInitializes the Fragmenter. You can grab references to the Attributes you are interested in from tokenStream and then access the values inFragmenter.isNewFragment().- Specified by:
startin interfaceFragmenter- Parameters:
s- the original source texttokenStream- theTokenStreamto be fragmented
-
isNewFragment
public boolean isNewFragment()Description copied from interface:FragmenterTest to see if this token from the stream should be held in a new TextFragment. Every time this is called, the TokenStream passed to start(String, TokenStream) will have been incremented.- Specified by:
isNewFragmentin interfaceFragmenter
-