@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. |
boolean |
copyFields
Copy Solr fields from the search result to Carrot2
Document instances (as fields). |
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 |
solrFilterQuery
Filter query appended to
serviceUrlBase . |
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.
|
redirectStrategy, xmlDocumentSourceHelper
compressed, 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, loadProcessingResult
process
afterFetch, clean, urlEncode
afterProcessing, dispose, getContext, getSharedExecutor
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
afterProcessing, dispose
protected 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="Filter query") @Level(value=MEDIUM) @Group(value="Service") public String solrFilterQuery
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.
@Input @Processing @Attribute @Label(value="Copy Solr document fields") @Level(value=ADVANCED) @Group(value="Index field mapping") public boolean copyFields
Document
instances (as fields).@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)
RemoteXmlSimpleSearchEngineBase
ProcessingResult
deserialized.afterFetch
in class RemoteXmlSimpleSearchEngineBase
protected String buildServiceUrl()
RemoteXmlSimpleSearchEngineBase
buildServiceUrl
in class RemoteXmlSimpleSearchEngineBase
protected IResource getXsltResource()
RemoteXmlSimpleSearchEngineBase
getXsltResource
in class RemoteXmlSimpleSearchEngineBase
protected Map<String,String> getXsltParameters()
RemoteXmlSimpleSearchEngineBase
null
.getXsltParameters
in class RemoteXmlSimpleSearchEngineBase