|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.search.vectorhighlight.FastVectorHighlighter
public class FastVectorHighlighter
Another highlighter implementation.
Field Summary | |
---|---|
static boolean |
DEFAULT_FIELD_MATCH
|
static boolean |
DEFAULT_PHRASE_HIGHLIGHT
|
Constructor Summary | |
---|---|
FastVectorHighlighter()
the default constructor. |
|
FastVectorHighlighter(boolean phraseHighlight,
boolean fieldMatch)
a constructor. |
|
FastVectorHighlighter(boolean phraseHighlight,
boolean fieldMatch,
FragListBuilder fragListBuilder,
FragmentsBuilder fragmentsBuilder)
a constructor. |
Method Summary | |
---|---|
String |
getBestFragment(FieldQuery fieldQuery,
IndexReader reader,
int docId,
String fieldName,
int fragCharSize)
return the best fragment. |
String |
getBestFragment(FieldQuery fieldQuery,
IndexReader reader,
int docId,
String fieldName,
int fragCharSize,
FragListBuilder fragListBuilder,
FragmentsBuilder fragmentsBuilder,
String[] preTags,
String[] postTags,
Encoder encoder)
return the best fragment. |
String[] |
getBestFragments(FieldQuery fieldQuery,
IndexReader reader,
int docId,
String fieldName,
int fragCharSize,
int maxNumFragments)
return the best fragments. |
String[] |
getBestFragments(FieldQuery fieldQuery,
IndexReader reader,
int docId,
String fieldName,
int fragCharSize,
int maxNumFragments,
FragListBuilder fragListBuilder,
FragmentsBuilder fragmentsBuilder,
String[] preTags,
String[] postTags,
Encoder encoder)
return the best fragments. |
FieldQuery |
getFieldQuery(Query query)
create a FieldQuery object. |
FieldQuery |
getFieldQuery(Query query,
IndexReader reader)
create a FieldQuery object. |
int |
getPhraseLimit()
|
boolean |
isFieldMatch()
return whether fieldMatch or not. |
boolean |
isPhraseHighlight()
return whether phraseHighlight or not. |
void |
setPhraseLimit(int phraseLimit)
set the maximum number of phrases to analyze when searching for the highest-scoring phrase. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean DEFAULT_PHRASE_HIGHLIGHT
public static final boolean DEFAULT_FIELD_MATCH
Constructor Detail |
---|
public FastVectorHighlighter()
public FastVectorHighlighter(boolean phraseHighlight, boolean fieldMatch)
SimpleFragListBuilder
and ScoreOrderFragmentsBuilder
.
phraseHighlight
- true or false for phrase highlightingfieldMatch
- true of false for field matchingpublic FastVectorHighlighter(boolean phraseHighlight, boolean fieldMatch, FragListBuilder fragListBuilder, FragmentsBuilder fragmentsBuilder)
FragListBuilder
and a FragmentsBuilder
can be specified (plugins).
phraseHighlight
- true of false for phrase highlightingfieldMatch
- true of false for field matchingfragListBuilder
- an instance of FragListBuilder
fragmentsBuilder
- an instance of FragmentsBuilder
Method Detail |
---|
public FieldQuery getFieldQuery(Query query)
FieldQuery
object.
query
- a query
FieldQuery
objectpublic FieldQuery getFieldQuery(Query query, IndexReader reader) throws IOException
FieldQuery
object.
query
- a query
FieldQuery
object
IOException
public final String getBestFragment(FieldQuery fieldQuery, IndexReader reader, int docId, String fieldName, int fragCharSize) throws IOException
fieldQuery
- FieldQuery
objectreader
- IndexReader
of the indexdocId
- document id to be highlightedfieldName
- field of the document to be highlightedfragCharSize
- the length (number of chars) of a fragment
IOException
public final String[] getBestFragments(FieldQuery fieldQuery, IndexReader reader, int docId, String fieldName, int fragCharSize, int maxNumFragments) throws IOException
fieldQuery
- FieldQuery
objectreader
- IndexReader
of the indexdocId
- document id to be highlightedfieldName
- field of the document to be highlightedfragCharSize
- the length (number of chars) of a fragmentmaxNumFragments
- maximum number of fragments
IOException
public final String getBestFragment(FieldQuery fieldQuery, IndexReader reader, int docId, String fieldName, int fragCharSize, FragListBuilder fragListBuilder, FragmentsBuilder fragmentsBuilder, String[] preTags, String[] postTags, Encoder encoder) throws IOException
fieldQuery
- FieldQuery
objectreader
- IndexReader
of the indexdocId
- document id to be highlightedfieldName
- field of the document to be highlightedfragCharSize
- the length (number of chars) of a fragmentfragListBuilder
- FragListBuilder
objectfragmentsBuilder
- FragmentsBuilder
objectpreTags
- pre-tags to be used to highlight termspostTags
- post-tags to be used to highlight termsencoder
- an encoder that generates encoded text
IOException
public final String[] getBestFragments(FieldQuery fieldQuery, IndexReader reader, int docId, String fieldName, int fragCharSize, int maxNumFragments, FragListBuilder fragListBuilder, FragmentsBuilder fragmentsBuilder, String[] preTags, String[] postTags, Encoder encoder) throws IOException
fieldQuery
- FieldQuery
objectreader
- IndexReader
of the indexdocId
- document id to be highlightedfieldName
- field of the document to be highlightedfragCharSize
- the length (number of chars) of a fragmentmaxNumFragments
- maximum number of fragmentsfragListBuilder
- FragListBuilder
objectfragmentsBuilder
- FragmentsBuilder
objectpreTags
- pre-tags to be used to highlight termspostTags
- post-tags to be used to highlight termsencoder
- an encoder that generates encoded text
IOException
public boolean isPhraseHighlight()
public boolean isFieldMatch()
public int getPhraseLimit()
public void setPhraseLimit(int phraseLimit)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |