Package com.acumenvelocity.ath.solr
Class SolrIndexWriterStep
- java.lang.Object
-
- net.sf.okapi.common.pipeline.BasePipelineStep
-
- com.acumenvelocity.ath.solr.SolrIndexWriterStep
-
- All Implemented Interfaces:
AutoCloseable,Function<Stream<net.sf.okapi.common.Event>,Stream<net.sf.okapi.common.Event>>,net.sf.okapi.common.pipeline.IPipelineStep
- Direct Known Subclasses:
SolrDocWriterStep,SolrTmWriterStep
public abstract class SolrIndexWriterStep extends net.sf.okapi.common.pipeline.BasePipelineStepAbstract base class for indexing text units into a Solr instance using batched operations. Subclasses provide custom field population logic for index documents.
-
-
Constructor Summary
Constructors Constructor Description SolrIndexWriterStep(org.apache.solr.client.solrj.SolrClient solrClient, int tuBatchSize, String coreName, boolean autoCommit, boolean requireTarget)Constructs the step with batch capacity, index identifier, and auto-commit option.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCoreName()StringgetDescription()StringgetName()org.apache.solr.client.solrj.SolrClientgetSolrClient()List<net.sf.okapi.common.resource.ITextUnit>getTuBatch()intgetTuBatchSize()booleanisAutoCommit()booleanisRequireTarget()-
Methods inherited from class net.sf.okapi.common.pipeline.BasePipelineStep
cancel, destroy, getHelpLocation, getParameters, getSourceLocale, getTargetLocale, handleEvent, isDone, isLastOutputStep, setLastOutputStep, setParameters, setSourceLocale, setTargetLocale
-
-
-
-
Constructor Detail
-
SolrIndexWriterStep
public SolrIndexWriterStep(org.apache.solr.client.solrj.SolrClient solrClient, int tuBatchSize, String coreName, boolean autoCommit, boolean requireTarget)Constructs the step with batch capacity, index identifier, and auto-commit option.- Parameters:
tuBatchSize- Maximum number of TUs per TU batch.coreName- The identifier for the Solr index.autoCommit- Whether to commit changes automatically after each batch.
-
-
Method Detail
-
getName
public String getName()
-
getDescription
public String getDescription()
-
getSolrClient
public org.apache.solr.client.solrj.SolrClient getSolrClient()
-
getCoreName
public String getCoreName()
-
isAutoCommit
public boolean isAutoCommit()
-
getTuBatchSize
public int getTuBatchSize()
-
getTuBatch
public List<net.sf.okapi.common.resource.ITextUnit> getTuBatch()
-
isRequireTarget
public boolean isRequireTarget()
-
-