C# Class Lucene.Net.Search.Highlight.QueryScorer

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.
Inheritance: IScorer
Afficher le fichier Open project: synhershko/lucene.net Class Usage Examples

Méthodes publiques

Méthode Description
GetTokenScore ( ) : float
GetWeightedSpanTerm ( String token ) : WeightedSpanTerm

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

Init ( TokenStream tokenStream ) : TokenStream
QueryScorer ( Query query ) : System

Constructs a new QueryScorer instance

QueryScorer ( Query query, IndexReader reader, String field ) : System

Constructs a new QueryScorer instance

QueryScorer ( Query query, IndexReader reader, String field, String defaultField ) : System

Constructs a new QueryScorer instance

QueryScorer ( Query query, String field ) : System

Constructs a new QueryScorer instance

QueryScorer ( Query query, String field, String defaultField ) : System

Constructs a new QueryScorer instance

QueryScorer ( WeightedSpanTerm weightedTerms ) : System

Constructs a new QueryScorer instance

SetWrapIfNotCachingTokenFilter ( bool wrap ) : void

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.

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

Private Methods

Méthode Description
Init ( Query query, String field, IndexReader reader, bool expandMultiTermQuery ) : void
InitExtractor ( TokenStream tokenStream ) : TokenStream

Method Details

GetTokenScore() public méthode

public GetTokenScore ( ) : float
Résultat float

GetWeightedSpanTerm() public méthode

Retrieve the WeightedSpanTerm for the specified token. Useful for passing Span information to a IFragmenter.
public GetWeightedSpanTerm ( String token ) : WeightedSpanTerm
token String token to get {@link WeightedSpanTerm} for
Résultat WeightedSpanTerm

Init() public méthode

public Init ( TokenStream tokenStream ) : TokenStream
tokenStream Lucene.Net.Analysis.TokenStream
Résultat Lucene.Net.Analysis.TokenStream

QueryScorer() public méthode

Constructs a new QueryScorer instance
public QueryScorer ( Query query ) : System
query Query Query to use for highlighting
Résultat System

QueryScorer() public méthode

Constructs a new QueryScorer instance
public QueryScorer ( Query query, IndexReader reader, String field ) : System
query Query Query to use for highlighting
reader Lucene.Net.Index.IndexReader to use for quasi tf/idf scoring
field String Field to highlight - pass null to ignore fields
Résultat System

QueryScorer() public méthode

Constructs a new QueryScorer instance
public QueryScorer ( Query query, IndexReader reader, String field, String defaultField ) : System
query Query Query to use for highlighting
reader Lucene.Net.Index.IndexReader to use for quasi tf/idf scoring
field String Field to highlight - pass null to ignore fields
defaultField String The default field for queries with the field name unspecified
Résultat System

QueryScorer() public méthode

Constructs a new QueryScorer instance
public QueryScorer ( Query query, String field ) : System
query Query Query to use for highlighting
field String Field to highlight - pass null to ignore fields
Résultat System

QueryScorer() public méthode

Constructs a new QueryScorer instance
public QueryScorer ( Query query, String field, String defaultField ) : System
query Query Query to use for highlighting
field String Field to highlight - pass null to ignore fields
defaultField String The default field for queries with the field name unspecified
Résultat System

QueryScorer() public méthode

Constructs a new QueryScorer instance
public QueryScorer ( WeightedSpanTerm weightedTerms ) : System
weightedTerms WeightedSpanTerm an array of pre-created s
Résultat System

SetWrapIfNotCachingTokenFilter() public méthode

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.
public SetWrapIfNotCachingTokenFilter ( bool wrap ) : void
wrap bool
Résultat void

StartFragment() public méthode

public StartFragment ( Lucene.Net.Search.Highlight.TextFragment newFragment ) : void
newFragment Lucene.Net.Search.Highlight.TextFragment
Résultat void