|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.solr.highlight.SolrHighlighter org.apache.solr.highlight.PostingsSolrHighlighter
public class PostingsSolrHighlighter
Highlighter impl that uses PostingsHighlighter
Example configuration:
<searchComponent class="solr.HighlightComponent" name="highlight"> <highlighting class="org.apache.solr.highlight.PostingsSolrHighlighter" preTag="<em>" postTag="</em>" ellipsis="... " maxLength=10000/> </searchComponent>
Notes:
Field Summary | |
---|---|
protected PostingsHighlighter |
highlighter
|
Fields inherited from class org.apache.solr.highlight.SolrHighlighter |
---|
boundaryScanners, encoders, formatters, fragListBuilders, fragmenters, fragmentsBuilders, log |
Constructor Summary | |
---|---|
PostingsSolrHighlighter()
|
Method Summary | |
---|---|
NamedList<Object> |
doHighlighting(DocList docs,
Query query,
SolrQueryRequest req,
String[] defaultFields)
Generates a list of Highlighted query fragments for each item in a list of documents, or returns null if highlighting is disabled. |
protected NamedList<Object> |
encodeSnippets(String[] keys,
String[] fieldNames,
Map<String,String[]> snippets)
Encodes the resulting snippets into a namedlist |
protected String[] |
getUniqueKeys(SolrIndexSearcher searcher,
TopDocs topDocs)
Retrieves the unique keys for the topdocs to key the results |
void |
init(PluginInfo info)
|
void |
initalize(SolrConfig config)
|
protected TopDocs |
toTopDocs(DocList docs)
Converts solr's DocList to a lucene TopDocs |
Methods inherited from class org.apache.solr.highlight.SolrHighlighter |
---|
emptyArray, getHighlightFields, isHighlightingEnabled |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected PostingsHighlighter highlighter
Constructor Detail |
---|
public PostingsSolrHighlighter()
Method Detail |
---|
public void initalize(SolrConfig config)
initalize
in class SolrHighlighter
public void init(PluginInfo info)
init
in interface PluginInfoInitialized
public NamedList<Object> doHighlighting(DocList docs, Query query, SolrQueryRequest req, String[] defaultFields) throws IOException
SolrHighlighter
doHighlighting
in class SolrHighlighter
docs
- query resultsquery
- the queryreq
- the current requestdefaultFields
- default list of fields to summarize
IOException
protected NamedList<Object> encodeSnippets(String[] keys, String[] fieldNames, Map<String,String[]> snippets)
keys
- the document unique keysfieldNames
- field names to highlight in the ordersnippets
- map from field name to snippet array for the docs
protected TopDocs toTopDocs(DocList docs)
protected String[] getUniqueKeys(SolrIndexSearcher searcher, TopDocs topDocs) throws IOException
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |