Class 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.BasePipelineStep
    Abstract base class for indexing text units into a Solr instance using batched operations. Subclasses provide custom field population logic for index documents.
    • 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()