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 | Static Public Attributes | Properties | List of all members
Lucene.Net.Search.Vectorhighlight.FastVectorHighlighter Class Reference

Public Member Functions

 FastVectorHighlighter ()
 the default constructor.
 
 FastVectorHighlighter (bool phraseHighlight, bool fieldMatch)
 a constructor. Using SimpleFragListBuilder and ScoreOrderFragmentsBuilder.
 
 FastVectorHighlighter (bool phraseHighlight, bool fieldMatch, FragListBuilder fragListBuilder, FragmentsBuilder fragmentsBuilder)
 a constructor. A FragListBuilder and a FragmentsBuilder can be specified (plugins).
 
FieldQuery GetFieldQuery (Query query)
 create a FieldQuery object.
 
String GetBestFragment (FieldQuery fieldQuery, IndexReader reader, int docId, String fieldName, int fragCharSize)
 return the best fragment.
 
String[] GetBestFragments (FieldQuery fieldQuery, IndexReader reader, int docId, String fieldName, int fragCharSize, int maxNumFragments)
 return the best fragments.
 
bool IsPhraseHighlight ()
 return whether phraseHighlight or not.
 
bool IsFieldMatch ()
 return whether fieldMatch or not.
 

Static Public Attributes

static bool DEFAULT_PHRASE_HIGHLIGHT = true
 
static bool DEFAULT_FIELD_MATCH = true
 

Properties

int PhraseLimit [get, set]
 The maximum number of phrases to analyze when searching for the highest-scoring phrase. The default is 5000. To ensure that all phrases are analyzed, use a negative number or Integer.MAX_VALUE.
 

Detailed Description

Definition at line 26 of file FastVectorHighlighter.cs.

Constructor & Destructor Documentation

Lucene.Net.Search.Vectorhighlight.FastVectorHighlighter.FastVectorHighlighter ( )

the default constructor.

Definition at line 40 of file FastVectorHighlighter.cs.

Lucene.Net.Search.Vectorhighlight.FastVectorHighlighter.FastVectorHighlighter ( bool  phraseHighlight,
bool  fieldMatch 
)

a constructor. Using SimpleFragListBuilder and ScoreOrderFragmentsBuilder.

Parameters
phraseHighlighttrue or false for phrase highlighting
fieldMatchtrue of false for field matching

Definition at line 49 of file FastVectorHighlighter.cs.

Lucene.Net.Search.Vectorhighlight.FastVectorHighlighter.FastVectorHighlighter ( bool  phraseHighlight,
bool  fieldMatch,
FragListBuilder  fragListBuilder,
FragmentsBuilder  fragmentsBuilder 
)

a constructor. A FragListBuilder and a FragmentsBuilder can be specified (plugins).

Parameters
phraseHighlighttrue of false for phrase highlighting
fieldMatchtrue of false for field matching
fragListBuilderan instance of FragListBuilder
fragmentsBuilderan instance of FragmentsBuilder

Definition at line 60 of file FastVectorHighlighter.cs.

Member Function Documentation

String Lucene.Net.Search.Vectorhighlight.FastVectorHighlighter.GetBestFragment ( FieldQuery  fieldQuery,
IndexReader  reader,
int  docId,
String  fieldName,
int  fragCharSize 
)

return the best fragment.

Parameters
fieldQueryFieldQuery object
readerIndexReader of the index
docIddocument id to be highlighted
fieldNamefield of the document to be highlighted
fragCharSizethe length (number of chars) of a fragment
Returns
the best fragment (snippet) string

Definition at line 89 of file FastVectorHighlighter.cs.

String [] Lucene.Net.Search.Vectorhighlight.FastVectorHighlighter.GetBestFragments ( FieldQuery  fieldQuery,
IndexReader  reader,
int  docId,
String  fieldName,
int  fragCharSize,
int  maxNumFragments 
)

return the best fragments.

Parameters
fieldQueryFieldQuery object
readerIndexReader of the index
docIddocument id to be highlighted
fieldNamefield of the document to be highlighted
fragCharSizethe length (number of chars) of a fragment
maxNumFragmentsmaximum number of fragments
Returns
created fragments or null when no fragments created. Size of the array can be less than maxNumFragments

Definition at line 106 of file FastVectorHighlighter.cs.

FieldQuery Lucene.Net.Search.Vectorhighlight.FastVectorHighlighter.GetFieldQuery ( Query  query)

create a FieldQuery object.

Parameters
querya query
Returns
the created FieldQuery object

Definition at line 74 of file FastVectorHighlighter.cs.

bool Lucene.Net.Search.Vectorhighlight.FastVectorHighlighter.IsFieldMatch ( )

return whether fieldMatch or not.

Returns
return whether fieldMatch or not.

Definition at line 134 of file FastVectorHighlighter.cs.

bool Lucene.Net.Search.Vectorhighlight.FastVectorHighlighter.IsPhraseHighlight ( )

return whether phraseHighlight or not.

Returns
return whether phraseHighlight or not.

Definition at line 125 of file FastVectorHighlighter.cs.

Member Data Documentation

bool Lucene.Net.Search.Vectorhighlight.FastVectorHighlighter.DEFAULT_FIELD_MATCH = true
static

Definition at line 30 of file FastVectorHighlighter.cs.

bool Lucene.Net.Search.Vectorhighlight.FastVectorHighlighter.DEFAULT_PHRASE_HIGHLIGHT = true
static

Definition at line 29 of file FastVectorHighlighter.cs.

Property Documentation

int Lucene.Net.Search.Vectorhighlight.FastVectorHighlighter.PhraseLimit
getset

The maximum number of phrases to analyze when searching for the highest-scoring phrase. The default is 5000. To ensure that all phrases are analyzed, use a negative number or Integer.MAX_VALUE.

Definition at line 145 of file FastVectorHighlighter.cs.


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