|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.solr.util.HighlightingUtils
public class HighlightingUtils
Collection of Utility and Factory methods for Highlighting.
Field Summary |
---|
Fields inherited from interface org.apache.solr.common.params.HighlightParams |
---|
ALTERNATE_FIELD, ALTERNATE_FIELD_LENGTH, FIELD_MATCH, FIELDS, FORMATTER, FRAGMENTER, FRAGSIZE, HIGHLIGHT, INCREMENT, MAX_CHARS, MAX_RE_CHARS, MERGE_CONTIGUOUS_FRAGMENTS, PATTERN, REGEX, SIMPLE, SIMPLE_POST, SIMPLE_PRE, SLOP, SNIPPETS, USE_PHRASE_HIGHLIGHTER |
Constructor Summary | |
---|---|
HighlightingUtils()
Deprecated. |
Method Summary | |
---|---|
static org.apache.solr.common.util.NamedList |
doHighlighting(DocList docs,
Query query,
SolrQueryRequest req,
String[] defaultFields)
Deprecated. Generates a list of Highlighted query fragments for each item in a list of documents, or returns null if highlighting is disabled. |
static Formatter |
getFormatter(String fieldName,
SolrQueryRequest request)
Deprecated. Return a formatter appropriate for this field. |
static Fragmenter |
getFragmenter(String fieldName,
SolrQueryRequest request)
Deprecated. Return a fragmenter appropriate for this field. |
static Highlighter |
getHighlighter(Query query,
String fieldName,
SolrQueryRequest request)
Deprecated. Return a Highlighter appropriate for this field. |
static String[] |
getHighlightFields(Query query,
SolrQueryRequest request,
String[] defaultFields)
Deprecated. Return a String array of the fields to be highlighted. |
static int |
getMaxSnippets(String fieldName,
SolrQueryRequest request)
Deprecated. Return the max number of snippets for this field. |
static QueryScorer |
getQueryScorer(Query query,
String fieldName,
SolrQueryRequest request)
Deprecated. Return a QueryScorer suitable for this Query and field. |
static boolean |
isHighlightingEnabled(SolrQueryRequest request)
Deprecated. Check whether Highlighting is enabled for this request. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HighlightingUtils()
Method Detail |
---|
public static boolean isHighlightingEnabled(SolrQueryRequest request)
request
- The current SolrQueryRequest
true
if highlighting enabled, false
if not.public static Highlighter getHighlighter(Query query, String fieldName, SolrQueryRequest request)
query
- The current QueryfieldName
- The name of the fieldrequest
- The current SolrQueryRequestpublic static QueryScorer getQueryScorer(Query query, String fieldName, SolrQueryRequest request)
query
- The current queryfieldName
- The name of the fieldrequest
- The SolrQueryRequestpublic static 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.public static int getMaxSnippets(String fieldName, SolrQueryRequest request)
fieldName
- The name of the fieldrequest
- The current SolrQueryRequestpublic static Formatter getFormatter(String fieldName, SolrQueryRequest request)
fieldName
- The name of the fieldrequest
- The current SolrQueryRequest
public static Fragmenter getFragmenter(String fieldName, SolrQueryRequest request)
fieldName
- The name of the fieldrequest
- The current SolrQueryRequest
public static org.apache.solr.common.util.NamedList doHighlighting(DocList docs, Query query, SolrQueryRequest req, String[] defaultFields) throws IOException
docs
- query resultsquery
- the queryreq
- the current requestdefaultFields
- default list of fields to summarize
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |