|
||||||||||
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 | |
---|---|
static org.slf4j.Logger |
log
|
Fields inherited from class org.apache.solr.highlight.SolrHighlighter |
---|
boundaryScanners, encoders, formatters, fragListBuilders, fragmenters, fragmentsBuilders |
Constructor Summary | |
---|---|
DefaultSolrHighlighter()
|
|
DefaultSolrHighlighter(SolrCore solrCore)
|
Method Summary | |
---|---|
NamedList<Object> |
doHighlighting(DocList docs,
org.apache.lucene.search.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 org.apache.lucene.search.highlight.Encoder |
getEncoder(String fieldName,
SolrParams params)
Return an Encoder appropriate for this field. |
protected org.apache.lucene.search.highlight.Formatter |
getFormatter(String fieldName,
SolrParams params)
Return a Formatter appropriate for this field. |
protected org.apache.lucene.search.vectorhighlight.FragListBuilder |
getFragListBuilder(String fieldName,
SolrParams params)
|
protected org.apache.lucene.search.highlight.Fragmenter |
getFragmenter(String fieldName,
SolrParams params)
Return a Fragmenter appropriate for this field. |
protected org.apache.lucene.search.vectorhighlight.FragmentsBuilder |
getFragmentsBuilder(String fieldName,
SolrParams params)
|
protected org.apache.lucene.search.highlight.Highlighter |
getHighlighter(org.apache.lucene.search.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 org.apache.lucene.search.highlight.Highlighter |
getPhraseHighlighter(org.apache.lucene.search.Query query,
String fieldName,
SolrQueryRequest request,
org.apache.lucene.analysis.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
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 org.apache.lucene.search.highlight.Highlighter getPhraseHighlighter(org.apache.lucene.search.Query query, String fieldName, SolrQueryRequest request, org.apache.lucene.analysis.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
protected org.apache.lucene.search.highlight.Highlighter getHighlighter(org.apache.lucene.search.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 org.apache.lucene.search.highlight.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 org.apache.lucene.search.highlight.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 org.apache.lucene.search.highlight.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 org.apache.lucene.search.vectorhighlight.FragListBuilder getFragListBuilder(String fieldName, SolrParams params)
protected org.apache.lucene.search.vectorhighlight.FragmentsBuilder getFragmentsBuilder(String fieldName, SolrParams params)
public NamedList<Object> doHighlighting(DocList docs, org.apache.lucene.search.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 |