public abstract class SolrHighlighter extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_CHARS |
static int |
DEFAULT_PHRASE_LIMIT |
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.
|
boolean |
isHighlightingEnabled(SolrParams params)
Check whether Highlighting is enabled for this request.
|
public static int DEFAULT_MAX_CHARS
public static int DEFAULT_PHRASE_LIMIT
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-2019 Apache Software Foundation. All Rights Reserved.