|
||||||||||
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,
org.apache.lucene.index.IndexReader reader,
int docId,
String fieldName,
int fragCharSize)
return the best fragment. |
String[] |
getBestFragments(FieldQuery fieldQuery,
org.apache.lucene.index.IndexReader reader,
int docId,
String fieldName,
int fragCharSize,
int maxNumFragments)
return the best fragments. |
FieldQuery |
getFieldQuery(org.apache.lucene.search.Query query)
create a FieldQuery object. |
boolean |
isFieldMatch()
return whether fieldMatch or not. |
boolean |
isPhraseHighlight()
return whether phraseHighlight or not. |
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)
phraseHighlight
- true or false for phrase highlightingfieldMatch
- true of false for field matchingpublic FastVectorHighlighter(boolean phraseHighlight, boolean fieldMatch, FragListBuilder fragListBuilder, FragmentsBuilder fragmentsBuilder)
phraseHighlight
- true of false for phrase highlightingfieldMatch
- true of false for field matchingfragListBuilder
- an instance of FragListBuilderfragmentsBuilder
- an instance of FragmentsBuilderMethod Detail |
---|
public FieldQuery getFieldQuery(org.apache.lucene.search.Query query)
query
- a query
public final String getBestFragment(FieldQuery fieldQuery, org.apache.lucene.index.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, org.apache.lucene.index.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 boolean isPhraseHighlight()
public boolean isFieldMatch()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |