Class CmsSolrCopyModifiedUpateProcessor

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.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:
    CmsSolrCopyModifiedUpateProcessorFactory
    • Field Summary

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

        next
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods 
      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 Detail

      • CmsSolrCopyModifiedUpateProcessor

        public CmsSolrCopyModifiedUpateProcessor​(@Nonnull
                                                 java.lang.String source,
                                                 @Nonnull
                                                 java.lang.String target,
                                                 @Nonnull
                                                 java.util.regex.Pattern regex,
                                                 @Nonnull
                                                 java.lang.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 Detail

      • processAdd

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