Lucene.Net  3.0.3
Lucene.Net is a .NET port of the Java Lucene Indexing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties
Public Member Functions | Properties | List of all members
Lucene.Net.Search.Highlight.IScorer Interface Reference

Adds to the score for a fragment based on its tokens More...

Inherited by Lucene.Net.Search.Highlight.QueryScorer, and Lucene.Net.Search.Highlight.QueryTermScorer.

Public Member Functions

TokenStream Init (TokenStream tokenStream)
 Called to init the Scorer with a TokenStream. You can grab references to the attributes you are interested in here and access them from getTokenScore().
 
void StartFragment (TextFragment newFragment)
 Called when a new fragment is started for consideration.
 
float GetTokenScore ()
 Called for each token in the current fragment. The Highlighter will increment the TokenStream passed to init on every call.
 

Properties

float FragmentScore [get]
 

Detailed Description

Adds to the score for a fragment based on its tokens

Definition at line 24 of file IScorer.cs.

Member Function Documentation

float Lucene.Net.Search.Highlight.IScorer.GetTokenScore ( )

Called for each token in the current fragment. The Highlighter will increment the TokenStream passed to init on every call.

Returns
a score which is passed to the Highlighter class to influence the mark-up of the text (this return value is NOT used to score the fragment)

summary> Called when the Highlighter has 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 getTokenScore().

Implemented in Lucene.Net.Search.Highlight.QueryScorer, and Lucene.Net.Search.Highlight.QueryTermScorer.

TokenStream Lucene.Net.Search.Highlight.IScorer.Init ( TokenStream  tokenStream)

Called to init the Scorer with a TokenStream. You can grab references to the attributes you are interested in here and access them from getTokenScore().

Parameters
tokenStreamthe TokenStream that will be scored.
Returns
either a TokenStream that the Highlighter should continue using (eg if you read the tokenSream in this method) or null to continue using the same TokenStream that was passed in.
Exceptions
IOException

Implemented in Lucene.Net.Search.Highlight.QueryScorer, and Lucene.Net.Search.Highlight.QueryTermScorer.

void Lucene.Net.Search.Highlight.IScorer.StartFragment ( TextFragment  newFragment)

Called when a new fragment is started for consideration.

Parameters
newFragmentthe fragment that will be scored next

Implemented in Lucene.Net.Search.Highlight.QueryScorer, and Lucene.Net.Search.Highlight.QueryTermScorer.

Property Documentation

float Lucene.Net.Search.Highlight.IScorer.FragmentScore
get

Definition at line 60 of file IScorer.cs.


The documentation for this interface was generated from the following file: