public class HighlighterWrapper extends Object
| Constructor and Description |
|---|
HighlighterWrapper(org.apache.lucene.index.IndexReader indexReader) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getDocSnippets(org.apache.lucene.document.Document doc,
HashMap<String,ArrayList<String>> queryMap)
Highlights chosen terms of fields in a document, extracting the most
relevant sections
|
org.apache.lucene.index.IndexReader |
getIndexReader() |
Integer |
getMaximumSnippetsCount() |
Integer |
getSnippetSize() |
static String |
getSnippetString(List<String> snippets)
Transforms a list of snippets into a formatted string
|
void |
setIndexReader(org.apache.lucene.index.IndexReader indexReader) |
void |
setMaximumSnippetsCount(Integer maximumSnippetsCount) |
void |
setSnippetSize(Integer snippetSize) |
public HighlighterWrapper(org.apache.lucene.index.IndexReader indexReader)
public Integer getSnippetSize()
public void setSnippetSize(Integer snippetSize)
public Integer getMaximumSnippetsCount()
public void setMaximumSnippetsCount(Integer maximumSnippetsCount)
public org.apache.lucene.index.IndexReader getIndexReader()
public void setIndexReader(org.apache.lucene.index.IndexReader indexReader)
public List<String> getDocSnippets(org.apache.lucene.document.Document doc, HashMap<String,ArrayList<String>> queryMap) throws Exception
doc - the document that will be highlightedqueryMap - a mapping of all the fields and the attributesnull if no
terms foundExceptionCopyright © 2014. All Rights Reserved.