|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.solr.highlight.SolrHighlighter
org.apache.solr.highlight.DefaultSolrHighlighter
public class DefaultSolrHighlighter
Field Summary | |
---|---|
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 Summary | |
---|---|
DefaultSolrHighlighter()
|
|
DefaultSolrHighlighter(SolrCore solrCore)
|
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 Encoder |
getEncoder(String fieldName,
SolrParams params)
Return an Encoder appropriate for this field. |
protected Formatter |
getFormatter(String fieldName,
SolrParams params)
Return a Formatter appropriate for this field. |
protected FragListBuilder |
getFragListBuilder(String fieldName,
SolrParams params)
|
protected Fragmenter |
getFragmenter(String fieldName,
SolrParams params)
Return a Fragmenter appropriate for this field. |
protected FragmentsBuilder |
getFragmentsBuilder(String fieldName,
SolrParams params)
|
protected Highlighter |
getHighlighter(Query query,
String fieldName,
SolrQueryRequest request)
Return a Highlighter appropriate for this field. |
protected int |
getMaxSnippets(String fieldName,
SolrParams params)
Return the max number of snippets for this field. |
protected Highlighter |
getPhraseHighlighter(Query query,
String fieldName,
SolrQueryRequest request,
CachingTokenFilter tokenStream)
Return a phrase Highlighter appropriate for this field. |
void |
init(PluginInfo info)
|
void |
initalize(SolrConfig config)
Deprecated. |
protected boolean |
isMergeContiguousFragments(String fieldName,
SolrParams params)
Return whether adjacent fragments should be merged. |
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 |
---|
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
Constructor Detail |
---|
public DefaultSolrHighlighter()
public DefaultSolrHighlighter(SolrCore solrCore)
Method Detail |
---|
public void init(PluginInfo info)
init
in interface PluginInfoInitialized
@Deprecated public void initalize(SolrConfig config)
initalize
in class SolrHighlighter
protected Highlighter getPhraseHighlighter(Query query, String fieldName, SolrQueryRequest request, CachingTokenFilter tokenStream) throws IOException
Highlighter
appropriate for this field.
query
- The current QueryfieldName
- The name of the fieldrequest
- The current SolrQueryRequesttokenStream
- document text CachingTokenStream
IOException
- If there is a low-level I/O error.protected Highlighter getHighlighter(Query query, String fieldName, SolrQueryRequest request)
Highlighter
appropriate for this field.
query
- The current QueryfieldName
- The name of the fieldrequest
- The current SolrQueryRequestprotected int getMaxSnippets(String fieldName, SolrParams params)
fieldName
- The name of the fieldparams
- The params controlling Highlightingprotected boolean isMergeContiguousFragments(String fieldName, SolrParams params)
fieldName
- The name of the fieldparams
- The params controlling Highlightingprotected Formatter getFormatter(String fieldName, SolrParams params)
Formatter
appropriate for this field. If a formatter
has not been configured for this field, fall back to the configured
default or the solr default (SimpleHTMLFormatter
).
fieldName
- The name of the fieldparams
- The params controlling Highlighting
Formatter
.protected Encoder getEncoder(String fieldName, SolrParams params)
Encoder
appropriate for this field. If an encoder
has not been configured for this field, fall back to the configured
default or the solr default (DefaultEncoder
).
fieldName
- The name of the fieldparams
- The params controlling Highlighting
Encoder
.protected Fragmenter getFragmenter(String fieldName, SolrParams params)
Fragmenter
appropriate for this field. If a fragmenter
has not been configured for this field, fall back to the configured
default or the solr default (GapFragmenter
).
fieldName
- The name of the fieldparams
- The params controlling Highlighting
Fragmenter
.protected FragListBuilder getFragListBuilder(String fieldName, SolrParams params)
protected FragmentsBuilder getFragmentsBuilder(String fieldName, SolrParams params)
public NamedList<Object> doHighlighting(DocList docs, Query query, SolrQueryRequest req, String[] defaultFields) throws IOException
doHighlighting
in class SolrHighlighter
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 |