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
Classes | Public Member Functions | Properties | List of all members
Lucene.Net.Search.Highlight.WeightedSpanTermExtractor Class Reference

Class used to extract WeightedSpanTerms from a Query based on whether Terms from the Query are contained in a supplied Analysis.TokenStream. More...

Classes

class  FakeReader
 A fake IndexReader class to extract the field from a MultiTermQuery
 

Public Member Functions

 WeightedSpanTermExtractor ()
 
 WeightedSpanTermExtractor (String defaultField)
 
IDictionary< String,
WeightedSpanTerm
GetWeightedSpanTerms (Query query, TokenStream tokenStream)
 Creates a Map of WeightedSpanTerms from the given Query and TokenStream.
 
IDictionary< String,
WeightedSpanTerm
GetWeightedSpanTerms (Query query, TokenStream tokenStream, String fieldName)
 Creates a Map of WeightedSpanTerms from the given Query and TokenStream.
 
IDictionary< String,
WeightedSpanTerm
GetWeightedSpanTermsWithScores (Query query, TokenStream tokenStream, String fieldName, IndexReader reader)
 Creates a Map of WeightedSpanTerms from the given Query and TokenStream. Uses a supplied IndexReader to properly Weight terms (for gradient highlighting).
 
void SetWrapIfNotCachingTokenFilter (bool wrap)
 By default, Analysis.TokenStreams that are not of the type CachingTokenFilter are wrapped in a CachingTokenFilter to Analysis.TokenStream impl and you don't want it to be wrapped, set this to false.
 

Properties

bool ExpandMultiTermQuery [get, set]
 
bool IsCachedTokenStream [get]
 
TokenStream TokenStream [get]
 

Detailed Description

Class used to extract WeightedSpanTerms from a Query based on whether Terms from the Query are contained in a supplied Analysis.TokenStream.

Definition at line 41 of file WeightedSpanTermExtractor.cs.

Constructor & Destructor Documentation

Lucene.Net.Search.Highlight.WeightedSpanTermExtractor.WeightedSpanTermExtractor ( )

Definition at line 51 of file WeightedSpanTermExtractor.cs.

Lucene.Net.Search.Highlight.WeightedSpanTermExtractor.WeightedSpanTermExtractor ( String  defaultField)

Definition at line 55 of file WeightedSpanTermExtractor.cs.

Member Function Documentation

IDictionary<String, WeightedSpanTerm> Lucene.Net.Search.Highlight.WeightedSpanTermExtractor.GetWeightedSpanTerms ( Query  query,
TokenStream  tokenStream 
)

Creates a Map of WeightedSpanTerms from the given Query and TokenStream.

Parameters
queryquery that caused hit
tokenStreamTokenStream of text to be highlighted
Returns
Map containing WeightedSpanTerms

Definition at line 392 of file WeightedSpanTermExtractor.cs.

IDictionary<String, WeightedSpanTerm> Lucene.Net.Search.Highlight.WeightedSpanTermExtractor.GetWeightedSpanTerms ( Query  query,
TokenStream  tokenStream,
String  fieldName 
)

Creates a Map of WeightedSpanTerms from the given Query and TokenStream.

Parameters
queryquery that caused hit
tokenStreamtokenStream of text to be highlighted
fieldNamerestricts Term's used based on field name
Returns
Map containing WeightedSpanTerms

Definition at line 405 of file WeightedSpanTermExtractor.cs.

IDictionary<String, WeightedSpanTerm> Lucene.Net.Search.Highlight.WeightedSpanTermExtractor.GetWeightedSpanTermsWithScores ( Query  query,
TokenStream  tokenStream,
String  fieldName,
IndexReader  reader 
)

Creates a Map of WeightedSpanTerms from the given Query and TokenStream. Uses a supplied IndexReader to properly Weight terms (for gradient highlighting).

Parameters
queryQuery that caused hit
tokenStreamTokenstream of text to be highlighted
fieldNamerestricts Term's used based on field name
readerto use for scoring
Returns
Map of WeightedSpanTerms with quasi tf/idf scores

Definition at line 440 of file WeightedSpanTermExtractor.cs.

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

By default, Analysis.TokenStreams that are not of the type CachingTokenFilter are wrapped in a CachingTokenFilter to Analysis.TokenStream impl and you don't want it to be wrapped, set this to false.

Definition at line 635 of file WeightedSpanTermExtractor.cs.

Property Documentation

bool Lucene.Net.Search.Highlight.WeightedSpanTermExtractor.ExpandMultiTermQuery
getset

Definition at line 613 of file WeightedSpanTermExtractor.cs.

bool Lucene.Net.Search.Highlight.WeightedSpanTermExtractor.IsCachedTokenStream
get

Definition at line 619 of file WeightedSpanTermExtractor.cs.

TokenStream Lucene.Net.Search.Highlight.WeightedSpanTermExtractor.TokenStream
get

Definition at line 624 of file WeightedSpanTermExtractor.cs.


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