|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder
public abstract class BaseFragmentsBuilder
Field Summary | |
---|---|
static String[] |
COLORED_POST_TAGS
|
static String[] |
COLORED_PRE_TAGS
|
protected String[] |
postTags
|
protected String[] |
preTags
|
Constructor Summary | |
---|---|
protected |
BaseFragmentsBuilder()
|
protected |
BaseFragmentsBuilder(String[] preTags,
String[] postTags)
|
Method Summary | |
---|---|
String |
createFragment(IndexReader reader,
int docId,
String fieldName,
FieldFragList fieldFragList)
create a fragment. |
String |
createFragment(IndexReader reader,
int docId,
String fieldName,
FieldFragList fieldFragList,
String[] preTags,
String[] postTags,
Encoder encoder)
create a fragment. |
String[] |
createFragments(IndexReader reader,
int docId,
String fieldName,
FieldFragList fieldFragList,
int maxNumFragments)
create multiple fragments. |
String[] |
createFragments(IndexReader reader,
int docId,
String fieldName,
FieldFragList fieldFragList,
int maxNumFragments,
String[] preTags,
String[] postTags,
Encoder encoder)
create multiple fragments. |
protected Field[] |
getFields(IndexReader reader,
int docId,
String fieldName)
|
protected String[] |
getFieldValues(IndexReader reader,
int docId,
String fieldName)
Deprecated. |
protected String |
getFragmentSource(StringBuilder buffer,
int[] index,
Field[] values,
int startOffset,
int endOffset)
|
protected String |
getFragmentSource(StringBuilder buffer,
int[] index,
String[] values,
int startOffset,
int endOffset)
Deprecated. |
char |
getMultiValuedSeparator()
|
protected String |
getPostTag(int num)
|
protected String |
getPostTag(String[] postTags,
int num)
|
protected String |
getPreTag(int num)
|
protected String |
getPreTag(String[] preTags,
int num)
|
abstract List<FieldFragList.WeightedFragInfo> |
getWeightedFragInfoList(List<FieldFragList.WeightedFragInfo> src)
|
protected String |
makeFragment(StringBuilder buffer,
int[] index,
Field[] values,
FieldFragList.WeightedFragInfo fragInfo,
String[] preTags,
String[] postTags,
Encoder encoder)
|
protected String |
makeFragment(StringBuilder buffer,
int[] index,
String[] values,
FieldFragList.WeightedFragInfo fragInfo)
Deprecated. |
void |
setMultiValuedSeparator(char separator)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String[] preTags
protected String[] postTags
public static final String[] COLORED_PRE_TAGS
public static final String[] COLORED_POST_TAGS
Constructor Detail |
---|
protected BaseFragmentsBuilder()
protected BaseFragmentsBuilder(String[] preTags, String[] postTags)
Method Detail |
---|
public abstract List<FieldFragList.WeightedFragInfo> getWeightedFragInfoList(List<FieldFragList.WeightedFragInfo> src)
public String createFragment(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList) throws IOException
FragmentsBuilder
createFragment
in interface FragmentsBuilder
reader
- IndexReader of the indexdocId
- document id to be highlightedfieldName
- field of the document to be highlightedfieldFragList
- FieldFragList object
IOException
public String[] createFragments(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList, int maxNumFragments) throws IOException
FragmentsBuilder
createFragments
in interface FragmentsBuilder
reader
- IndexReader of the indexdocId
- document id to be highlighterfieldName
- field of the document to be highlightedfieldFragList
- FieldFragList objectmaxNumFragments
- maximum number of fragments
IOException
public String createFragment(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList, String[] preTags, String[] postTags, Encoder encoder) throws IOException
FragmentsBuilder
createFragment
in interface FragmentsBuilder
reader
- IndexReader of the indexdocId
- document id to be highlightedfieldName
- field of the document to be highlightedfieldFragList
- FieldFragList 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 String[] createFragments(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList, int maxNumFragments, String[] preTags, String[] postTags, Encoder encoder) throws IOException
FragmentsBuilder
createFragments
in interface FragmentsBuilder
reader
- IndexReader of the indexdocId
- document id to be highlighterfieldName
- field of the document to be highlightedfieldFragList
- FieldFragList objectmaxNumFragments
- maximum number of fragmentspreTags
- pre-tags to be used to highlight termspostTags
- post-tags to be used to highlight termsencoder
- an encoder that generates encoded text
IOException
@Deprecated protected String[] getFieldValues(IndexReader reader, int docId, String fieldName) throws IOException
IOException
protected Field[] getFields(IndexReader reader, int docId, String fieldName) throws IOException
IOException
@Deprecated protected String makeFragment(StringBuilder buffer, int[] index, String[] values, FieldFragList.WeightedFragInfo fragInfo)
protected String makeFragment(StringBuilder buffer, int[] index, Field[] values, FieldFragList.WeightedFragInfo fragInfo, String[] preTags, String[] postTags, Encoder encoder)
@Deprecated protected String getFragmentSource(StringBuilder buffer, int[] index, String[] values, int startOffset, int endOffset)
protected String getFragmentSource(StringBuilder buffer, int[] index, Field[] values, int startOffset, int endOffset)
public void setMultiValuedSeparator(char separator)
public char getMultiValuedSeparator()
protected String getPreTag(int num)
protected String getPostTag(int num)
protected String getPreTag(String[] preTags, int num)
protected String getPostTag(String[] postTags, int num)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |