Class CmsSolrCopyModifiedUpateProcessor

java.lang.Object
org.apache.solr.update.processor.UpdateRequestProcessor
org.opencms.search.solr.updateprocessors.CmsSolrCopyModifiedUpateProcessor
All Implemented Interfaces:
Closeable, AutoCloseable

public class CmsSolrCopyModifiedUpateProcessor extends org.apache.solr.update.processor.UpdateRequestProcessor
Implementation of an UpdateRequestProcessor that
  • reads a field's (source) value,
  • applies a regex replacement,
  • adds a field (target) with the modified value.
See Also:
  • Field Summary

    Fields inherited from class org.apache.solr.update.processor.UpdateRequestProcessor

    next
  • Constructor Summary

    Constructors
    Constructor
    Description
    CmsSolrCopyModifiedUpateProcessor(String source, String target, Pattern regex, String replacement, org.apache.solr.update.processor.UpdateRequestProcessor nextProcessor)
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    processAdd(org.apache.solr.update.AddUpdateCommand cmd)
     

    Methods inherited from class org.apache.solr.update.processor.UpdateRequestProcessor

    close, doClose, finish, processCommit, processDelete, processMergeIndexes, processRollback

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CmsSolrCopyModifiedUpateProcessor

      public CmsSolrCopyModifiedUpateProcessor(@Nonnull String source, @Nonnull String target, @Nonnull Pattern regex, @Nonnull String replacement, org.apache.solr.update.processor.UpdateRequestProcessor nextProcessor)
      Default constructor.
      Parameters:
      source - the name of the source field (where the original value is read from).
      target - the name of the target field (where the modified value is written to).
      regex - the regex applied to the original value.
      replacement - the replacement for the matched parts in the original value.
      nextProcessor - the UpdateRequestProcessor to process next.
  • Method Details

    • processAdd

      public void processAdd(org.apache.solr.update.AddUpdateCommand cmd) throws IOException
      Overrides:
      processAdd in class org.apache.solr.update.processor.UpdateRequestProcessor
      Throws:
      IOException
      See Also:
      • UpdateRequestProcessor.processAdd(org.apache.solr.update.AddUpdateCommand)