org.eclipse.smila.integration.solr
Class SolrIndexPipelet
java.lang.Object
org.eclipse.smila.integration.solr.SolrIndexPipelet
- All Implemented Interfaces:
- Pipelet
public class SolrIndexPipelet
- extends java.lang.Object
- implements Pipelet
This pipelet integrates the Apache Solr's REST API and is designed to be used both in processing and in search
pipelines.
|
Field Summary |
static java.lang.String |
UTF8
|
|
Method Summary |
void |
configure(AnyMap config)
set configuration of pipelet. |
java.lang.String[] |
process(Blackboard blackboard,
java.lang.String[] recordIds)
process records on Blackboard service. |
static java.lang.String |
replaceNonXMLChars(java.lang.String source)
This method replaces valid UTF-8 characters which are not allowed in XML with spaces. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UTF8
public static final java.lang.String UTF8
- See Also:
- Constant Field Values
SolrIndexPipelet
public SolrIndexPipelet()
process
public java.lang.String[] process(Blackboard blackboard,
java.lang.String[] recordIds)
throws ProcessingException
- Description copied from interface:
Pipelet
- process records on Blackboard service.
- Specified by:
process in interface Pipelet
- Parameters:
blackboard - Blackboard service managing the records.recordIds - Ids of records to process.
- Returns:
- Ids of result records. By default this should be the same as the passed in recordIds unless there is a
specific reason not to do so. This is especially true for SearchPiplets.
- Throws:
ProcessingException - error during processing.
configure
public void configure(AnyMap config)
throws ProcessingException
- Description copied from interface:
Pipelet
- set configuration of pipelet. called once after instantiation before the pipelet is actually used in a workflow.
- Specified by:
configure in interface Pipelet
- Parameters:
config - configuration of pipelet.
- Throws:
ProcessingException - configuration is not applicable for pipelet (missing properties, wrong datatypes)
replaceNonXMLChars
public static java.lang.String replaceNonXMLChars(java.lang.String source)
- This method replaces valid UTF-8 characters which are not allowed in XML with spaces.
- Parameters:
source - - the original source string
- Returns:
- The filtered string