Class CmsSolrCopyModifiedUpateProcessor
- java.lang.Object
-
- org.apache.solr.update.processor.UpdateRequestProcessor
-
- org.opencms.search.solr.updateprocessors.CmsSolrCopyModifiedUpateProcessor
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class CmsSolrCopyModifiedUpateProcessor extends org.apache.solr.update.processor.UpdateRequestProcessor
Implementation of anUpdateRequestProcessor
that- reads a field's (source) value,
- applies a regex replacement,
- adds a field (target) with the modified value.
- See Also:
CmsSolrCopyModifiedUpateProcessorFactory
-
-
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)
-
-
-
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
- theUpdateRequestProcessor
to process next.
-
-
Method Detail
-
processAdd
public void processAdd(org.apache.solr.update.AddUpdateCommand cmd) throws java.io.IOException
- Overrides:
processAdd
in classorg.apache.solr.update.processor.UpdateRequestProcessor
- Throws:
java.io.IOException
- See Also:
UpdateRequestProcessor.processAdd(org.apache.solr.update.AddUpdateCommand)
-
-