public abstract class SolrHighlighter extends Object
Modifier and Type | Field and Description |
---|---|
protected Map<String,SolrBoundaryScanner> |
boundaryScanners |
protected Map<String,SolrEncoder> |
encoders |
protected Map<String,SolrFormatter> |
formatters |
protected Map<String,SolrFragListBuilder> |
fragListBuilders |
protected Map<String,SolrFragmenter> |
fragmenters |
protected Map<String,SolrFragmentsBuilder> |
fragmentsBuilders |
static org.slf4j.Logger |
log |
Constructor and Description |
---|
SolrHighlighter() |
Modifier and Type | Method and Description |
---|---|
abstract 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 boolean |
emptyArray(String[] arr) |
String[] |
getHighlightFields(Query query,
SolrQueryRequest request,
String[] defaultFields)
Return a String array of the fields to be highlighted.
|
abstract void |
initalize(SolrConfig config)
Deprecated.
|
boolean |
isHighlightingEnabled(SolrParams params)
Check whether Highlighting is enabled for this request.
|
public static org.slf4j.Logger log
protected final Map<String,SolrFormatter> formatters
protected final Map<String,SolrEncoder> encoders
protected final Map<String,SolrFragmenter> fragmenters
protected final Map<String,SolrFragListBuilder> fragListBuilders
protected final Map<String,SolrFragmentsBuilder> fragmentsBuilders
protected final Map<String,SolrBoundaryScanner> boundaryScanners
@Deprecated public abstract void initalize(SolrConfig config)
public boolean isHighlightingEnabled(SolrParams params)
params
- The params controlling Highlightingtrue
if highlighting enabled, false
if not.public String[] getHighlightFields(Query query, SolrQueryRequest request, String[] defaultFields)
query
- The current Queryrequest
- The current SolrQueryRequestdefaultFields
- Programmatic default highlight fields, used if nothing is specified in the handler config or the request.protected boolean emptyArray(String[] arr)
public abstract NamedList<Object> doHighlighting(DocList docs, Query query, SolrQueryRequest req, String[] defaultFields) throws IOException
docs
- query resultsquery
- the queryreq
- the current requestdefaultFields
- default list of fields to summarizeIOException
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.