Lucene.Net  3.0.3
Lucene.Net is a port of the Lucene search engine library, written in C# and targeted at .NET runtime users.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Pages
Public Member Functions | Properties | List of all members
Lucene.Net.Search.Highlight.QueryScorer Class Reference

IScorer implementation which scores text fragments by the number of unique query terms found. This class converts appropriate Querys to SpanQuerys and attempts to score only those terms that participated in generating the 'hit' on the document. More...

Inherits Lucene.Net.Search.Highlight.IScorer.

Public Member Functions

 QueryScorer (Query query)
 Constructs a new QueryScorer instance
 
 QueryScorer (Query query, String field)
 Constructs a new QueryScorer instance
 
 QueryScorer (Query query, IndexReader reader, String field)
 Constructs a new QueryScorer instance
 
 QueryScorer (Query query, IndexReader reader, String field, String defaultField)
 Constructs a new QueryScorer instance
 
 QueryScorer (Query query, String field, String defaultField)
 Constructs a new QueryScorer instance
 
 QueryScorer (WeightedSpanTerm[] weightedTerms)
 Constructs a new QueryScorer instance
 
float GetTokenScore ()
 
See Also
IScorer.GetTokenScore

 
TokenStream Init (TokenStream tokenStream)
 
See Also
IScorer.Init

 
WeightedSpanTerm GetWeightedSpanTerm (String token)
 Retrieve the WeightedSpanTerm for the specified token. Useful for passing Span information to a IFragmenter.
 
void StartFragment (TextFragment newFragment)
 
See Also
IScorer.StartFragment

 
void SetWrapIfNotCachingTokenFilter (bool wrap)
 By default, TokenStreams that are not of the type CachingTokenFilter are wrapped in a CachingTokenFilter to ensure an efficient reset - if you are already using a different caching TokenStream impl and you don't want it to be wrapped, set this to false.
 

Properties

float FragmentScore [get]
 
See Also
IScorer.FragmentScore

 
float MaxTermWeight [get]
 The highest weighted term (useful for passing to GradientFormatter to set top end of coloring scale).
 
bool IsExpandMultiTermQuery [get, set]
 Controls whether or not multi-term queries are expanded against a MemoryIndex IndexReader.
 
- Properties inherited from Lucene.Net.Search.Highlight.IScorer
float FragmentScore [get]
 

Detailed Description

IScorer implementation which scores text fragments by the number of unique query terms found. This class converts appropriate Querys to SpanQuerys and attempts to score only those terms that participated in generating the 'hit' on the document.

Definition at line 37 of file QueryScorer.cs.

Constructor & Destructor Documentation

Lucene.Net.Search.Highlight.QueryScorer.QueryScorer ( Query  query)

Constructs a new QueryScorer instance

Parameters
queryQuery to use for highlighting

Definition at line 58 of file QueryScorer.cs.

Lucene.Net.Search.Highlight.QueryScorer.QueryScorer ( Query  query,
String  field 
)

Constructs a new QueryScorer instance

Parameters
queryQuery to use for highlighting
fieldField to highlight - pass null to ignore fields

Definition at line 68 of file QueryScorer.cs.

Lucene.Net.Search.Highlight.QueryScorer.QueryScorer ( Query  query,
IndexReader  reader,
String  field 
)

Constructs a new QueryScorer instance

Parameters
queryQuery to use for highlighting
readerIndexReader to use for quasi tf/idf scoring
fieldField to highlight - pass null to ignore fields

Definition at line 79 of file QueryScorer.cs.

Lucene.Net.Search.Highlight.QueryScorer.QueryScorer ( Query  query,
IndexReader  reader,
String  field,
String  defaultField 
)

Constructs a new QueryScorer instance

Parameters
queryQuery to use for highlighting
readerIndexReader to use for quasi tf/idf scoring
fieldField to highlight - pass null to ignore fields
defaultFieldThe default field for queries with the field name unspecified

Definition at line 91 of file QueryScorer.cs.

Lucene.Net.Search.Highlight.QueryScorer.QueryScorer ( Query  query,
String  field,
String  defaultField 
)

Constructs a new QueryScorer instance

Parameters
queryQuery to use for highlighting
fieldField to highlight - pass null to ignore fields
defaultFieldThe default field for queries with the field name unspecified

Definition at line 104 of file QueryScorer.cs.

Lucene.Net.Search.Highlight.QueryScorer.QueryScorer ( WeightedSpanTerm[]  weightedTerms)

Constructs a new QueryScorer instance

Parameters
weightedTermsan array of pre-created WeightedSpanTerms

Definition at line 114 of file QueryScorer.cs.

Member Function Documentation

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

See Also
IScorer.GetTokenScore

Implements Lucene.Net.Search.Highlight.IScorer.

Definition at line 149 of file QueryScorer.cs.

WeightedSpanTerm Lucene.Net.Search.Highlight.QueryScorer.GetWeightedSpanTerm ( String  token)

Retrieve the WeightedSpanTerm for the specified token. Useful for passing Span information to a IFragmenter.

Parameters
tokentoken to get WeightedSpanTerm for
Returns
WeightedSpanTerm for token

Definition at line 202 of file QueryScorer.cs.

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

See Also
IScorer.Init

Implements Lucene.Net.Search.Highlight.IScorer.

Definition at line 180 of file QueryScorer.cs.

void Lucene.Net.Search.Highlight.QueryScorer.SetWrapIfNotCachingTokenFilter ( bool  wrap)

By default, TokenStreams that are not of the type CachingTokenFilter are wrapped in a CachingTokenFilter to ensure an efficient reset - if you are already using a different caching TokenStream impl and you don't want it to be wrapped, set this to false.

Definition at line 265 of file QueryScorer.cs.

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

See Also
IScorer.StartFragment

Implements Lucene.Net.Search.Highlight.IScorer.

Definition at line 242 of file QueryScorer.cs.

Property Documentation

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

See Also
IScorer.FragmentScore

Definition at line 136 of file QueryScorer.cs.

bool Lucene.Net.Search.Highlight.QueryScorer.IsExpandMultiTermQuery
getset

Controls whether or not multi-term queries are expanded against a MemoryIndex IndexReader.

Definition at line 253 of file QueryScorer.cs.

float Lucene.Net.Search.Highlight.QueryScorer.MaxTermWeight
get

The highest weighted term (useful for passing to GradientFormatter to set top end of coloring scale).

Definition at line 144 of file QueryScorer.cs.


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