public abstract class SolrHighlighter extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PHRASE_LIMIT |
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 int DEFAULT_PHRASE_LIMIT
public static org.slf4j.Logger log
@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-2014 Apache Software Foundation. All Rights Reserved.