public class AlfrescoSolrHighlighter
extends org.apache.solr.highlight.SolrHighlighter
implements org.apache.solr.util.plugin.PluginInfoInitialized
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,org.apache.solr.highlight.SolrBoundaryScanner> |
boundaryScanners |
protected Map<String,org.apache.solr.highlight.SolrEncoder> |
encoders |
protected Map<String,org.apache.solr.highlight.SolrFormatter> |
formatters |
protected Map<String,org.apache.solr.highlight.SolrFragListBuilder> |
fragListBuilders |
protected Map<String,org.apache.solr.highlight.SolrFragmenter> |
fragmenters |
protected Map<String,org.apache.solr.highlight.SolrFragmentsBuilder> |
fragmentsBuilders |
| Constructor and Description |
|---|
AlfrescoSolrHighlighter() |
AlfrescoSolrHighlighter(org.apache.solr.core.SolrCore solrCore) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.solr.common.util.NamedList<Object> |
doHighlighting(org.apache.solr.search.DocList docs,
org.apache.lucene.search.Query query,
org.apache.solr.request.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,
org.apache.solr.common.params.SolrParams params)
Return an
Encoder appropriate for this field. |
protected org.apache.lucene.search.highlight.Formatter |
getFormatter(String fieldName,
org.apache.solr.common.params.SolrParams params)
Return a
Formatter appropriate for this field. |
protected org.apache.lucene.search.vectorhighlight.FragListBuilder |
getFragListBuilder(String fieldName,
org.apache.solr.common.params.SolrParams params) |
protected org.apache.lucene.search.highlight.Fragmenter |
getFragmenter(String fieldName,
org.apache.solr.common.params.SolrParams params)
Return a
Fragmenter appropriate for this field. |
protected org.apache.lucene.search.vectorhighlight.FragmentsBuilder |
getFragmentsBuilder(String fieldName,
org.apache.solr.common.params.SolrParams params) |
protected org.apache.lucene.search.highlight.Highlighter |
getHighlighter(org.apache.lucene.search.Query query,
String requestFieldname,
String schemaFieldName,
org.apache.solr.request.SolrQueryRequest request)
Return a
Highlighter appropriate for this field. |
protected int |
getMaxSnippets(String fieldName,
org.apache.solr.common.params.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 requestFieldname,
String schemaFieldName,
org.apache.solr.request.SolrQueryRequest request,
org.apache.lucene.analysis.CachingTokenFilter tokenStream)
Return a phrase
Highlighter appropriate for this field. |
void |
init(org.apache.solr.core.PluginInfo info) |
void |
initalize(org.apache.solr.core.SolrConfig config)
Deprecated.
|
protected boolean |
isMergeContiguousFragments(String fieldName,
org.apache.solr.common.params.SolrParams params)
Return whether adjacent fragments should be merged.
|
static String |
locateContentHome(String solrHome) |
protected final Map<String,org.apache.solr.highlight.SolrFragListBuilder> fragListBuilders
protected final Map<String,org.apache.solr.highlight.SolrFragmentsBuilder> fragmentsBuilders
public AlfrescoSolrHighlighter()
public AlfrescoSolrHighlighter(org.apache.solr.core.SolrCore solrCore)
public void init(org.apache.solr.core.PluginInfo info)
init in interface org.apache.solr.util.plugin.PluginInfoInitialized@Deprecated public void initalize(org.apache.solr.core.SolrConfig config)
initalize in class org.apache.solr.highlight.SolrHighlighterprotected org.apache.lucene.search.highlight.Highlighter getPhraseHighlighter(org.apache.lucene.search.Query query,
String requestFieldname,
String schemaFieldName,
org.apache.solr.request.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 CachingTokenStreamIOException - If there is a low-level I/O error.protected org.apache.lucene.search.highlight.Highlighter getHighlighter(org.apache.lucene.search.Query query,
String requestFieldname,
String schemaFieldName,
org.apache.solr.request.SolrQueryRequest request)
Highlighter appropriate for this field.query - The current QueryfieldName - The name of the fieldrequest - The current SolrQueryRequestprotected int getMaxSnippets(String fieldName, org.apache.solr.common.params.SolrParams params)
fieldName - The name of the fieldparams - The params controlling Highlightingprotected boolean isMergeContiguousFragments(String fieldName, org.apache.solr.common.params.SolrParams params)
fieldName - The name of the fieldparams - The params controlling Highlightingprotected org.apache.lucene.search.highlight.Formatter getFormatter(String fieldName, org.apache.solr.common.params.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 HighlightingFormatter.protected org.apache.lucene.search.highlight.Encoder getEncoder(String fieldName, org.apache.solr.common.params.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 HighlightingEncoder.protected org.apache.lucene.search.highlight.Fragmenter getFragmenter(String fieldName, org.apache.solr.common.params.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 HighlightingFragmenter.protected org.apache.lucene.search.vectorhighlight.FragListBuilder getFragListBuilder(String fieldName, org.apache.solr.common.params.SolrParams params)
protected org.apache.lucene.search.vectorhighlight.FragmentsBuilder getFragmentsBuilder(String fieldName, org.apache.solr.common.params.SolrParams params)
public org.apache.solr.common.util.NamedList<Object> doHighlighting(org.apache.solr.search.DocList docs, org.apache.lucene.search.Query query, org.apache.solr.request.SolrQueryRequest req, String[] defaultFields) throws IOException
doHighlighting in class org.apache.solr.highlight.SolrHighlighterdocs - query resultsquery - the queryreq - the current requestdefaultFields - default list of fields to summarizeIOExceptionCopyright © 2005–2017 Alfresco Software. All rights reserved.