@Bindable(prefix="SolrDocumentSource") public class SolrDocumentSource extends RemoteXmlSimpleSearchEngineBase
| Modifier and Type | Field and Description |
|---|---|
List<Cluster> |
clusters
If
readClusters is true and clusters are present in the input
XML, they will be deserialized and exposed to components further down the processing
chain. |
protected static String |
FIELD_MAPPING |
boolean |
readClusters
If clusters are present in the Solr output they will be read and exposed to components
further down the processing chain.
|
String |
serviceUrlBase
Solr service URL base.
|
String |
solrIdFieldName
Document identifier field name (specified in Solr schema).
|
String |
solrSummaryFieldName
Summary field name.
|
String |
solrTitleFieldName
Title field name.
|
String |
solrUrlFieldName
URL field name.
|
IResource |
solrXsltAdapter
Provides a custom XSLT stylesheet for converting from Solr's output to
an XML format
parsed by Carrot2.
|
boolean |
useHighlighterOutput
If highlighter fragments are present in the Solr output they will be used (and preferred) over full
field content.
|
redirectStrategycompressed, documents, POSTPROCESSING, query, results, resultsTotal, SERVICE, start, statistics| Constructor and Description |
|---|
SolrDocumentSource() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterFetch(SearchEngineResponse response,
ProcessingResult processingResult)
Invoked after the response has been partially parsed and
ProcessingResult
deserialized. |
protected String |
buildServiceUrl()
Builds the URL from which XML stream will be fetched.
|
protected Map<String,String> |
getXsltParameters()
Returns parameters to be passed to the XSLT transformer.
|
protected IResource |
getXsltResource()
Returns the XSLT stylesheet that transforms the custom XML into Carrot2 compliant
XML.
|
beforeProcessing, fetchSearchResponse, getPassword, getUser, init, loadProcessingResultprocessafterFetch, clean, urlEncodeafterProcessing, dispose, getContext, getSharedExecutorclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitafterProcessing, disposeprotected static final String FIELD_MAPPING
@Input @Processing @Attribute @Label(value="Service URL") @Level(value=ADVANCED) @Group(value="Service") public String serviceUrlBase
@Input @Processing @Attribute @Label(value="Title field name") @Level(value=MEDIUM) @Group(value="Index field mapping") public String solrTitleFieldName
@Input @Processing @Attribute @Label(value="Summary field name") @Level(value=MEDIUM) @Group(value="Index field mapping") public String solrSummaryFieldName
@Input @Processing @Attribute @Label(value="URL field name") @Level(value=MEDIUM) @Group(value="Index field mapping") public String solrUrlFieldName
@Input @Processing @Attribute @Label(value="ID field name") @Level(value=MEDIUM) @Group(value="Index field mapping") public String solrIdFieldName
@Input @Attribute @Label(value="Custom XSLT adapter from Solr to Carrot2 format") @Level(value=ADVANCED) @Group(value="Index field mapping") public IResource solrXsltAdapter
@Input @Processing @Attribute @Label(value="Read Solr clusters if present") @Level(value=BASIC) @Group(value="Index field mapping") public boolean readClusters
solrIdFieldName is required to match
document references.@Input @Processing @Attribute @Label(value="Use highlighter output if present") @Level(value=BASIC) @Group(value="Index field mapping") public boolean useHighlighterOutput
Setting this option to false will disable using the highlighter output
entirely.
@Processing @Input @Output @Internal @Attribute(key="clusters") @Label(value="Clusters") @Level(value=BASIC) @Group(value="Search result information") public List<Cluster> clusters
readClusters is true and clusters are present in the input
XML, they will be deserialized and exposed to components further down the processing
chain.protected void afterFetch(SearchEngineResponse response, ProcessingResult processingResult)
RemoteXmlSimpleSearchEngineBaseProcessingResult
deserialized.afterFetch in class RemoteXmlSimpleSearchEngineBaseprotected String buildServiceUrl()
RemoteXmlSimpleSearchEngineBasebuildServiceUrl in class RemoteXmlSimpleSearchEngineBaseprotected IResource getXsltResource()
RemoteXmlSimpleSearchEngineBasegetXsltResource in class RemoteXmlSimpleSearchEngineBaseprotected Map<String,String> getXsltParameters()
RemoteXmlSimpleSearchEngineBasenull.getXsltParameters in class RemoteXmlSimpleSearchEngineBase