public interface Scorer
|Modifier and Type||Method and Description|
Called when the
Called for each token in the current fragment.
Called to init the Scorer with a
Called when a new fragment is started for consideration.
TokenStream init(TokenStream tokenStream) throws IOException
TokenStream. You can grab references to the attributes you are interested in here and access them from
TokenStreamthat will be scored.
TokenStreamthat the Highlighter should continue using (eg if you read the tokenSream in this method) or null to continue using the same
TokenStreamthat was passed in.
IOException- If there is a low-level I/O error
void startFragment(TextFragment newFragment)
newFragment- the fragment that will be scored next
Highlighterwill increment the
TokenStreampassed to init on every call.
Highlighterclass to influence the mark-up of the text (this return value is NOT used to score the fragment)
Highlighterhas no more tokens for the current fragment - the Scorer returns the weighting it has derived for the most recent fragment, typically based on the results of
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.