Package org.apache.solr.update.processor
Class SimpleUpdateProcessorFactory
- java.lang.Object
-
- org.apache.solr.update.processor.UpdateRequestProcessorFactory
-
- org.apache.solr.update.processor.SimpleUpdateProcessorFactory
-
- All Implemented Interfaces:
NamedListInitializedPlugin
- Direct Known Subclasses:
TemplateUpdateProcessorFactory
public abstract class SimpleUpdateProcessorFactory extends UpdateRequestProcessorFactory
A base class for writing a very simple UpdateProcessor without worrying too much about the API. This is deliberately made to support only the add operation- Since:
- 5.1.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.solr.update.processor.UpdateRequestProcessorFactory
UpdateRequestProcessorFactory.RunAlways
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.solr.common.util.NamedList<?>initArgs
-
Constructor Summary
Constructors Modifier Constructor Description protectedSimpleUpdateProcessorFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description UpdateRequestProcessorgetInstance(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next)protected StringgetMyName()protected StringgetParam(String name)protected String[]getParams(String name)returns value from init args or request parameter.voidinit(org.apache.solr.common.util.NamedList<?> args)initwill be called just once, immediately after creation.protected abstract voidprocess(AddUpdateCommand cmd, SolrQueryRequest req, SolrQueryResponse rsp)This object is reused across requests.
-
-
-
Method Detail
-
init
public void init(org.apache.solr.common.util.NamedList<?> args)
Description copied from interface:NamedListInitializedPlugininitwill be called just once, immediately after creation.Source of the initialization arguments will typically be solrconfig.xml, but will ultimately depends on the plugin itself
- Parameters:
args- non-null list of initialization parameters (may be empty)
-
getInstance
public UpdateRequestProcessor getInstance(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next)
- Specified by:
getInstancein classUpdateRequestProcessorFactory
-
getParams
protected String[] getParams(String name)
returns value from init args or request parameter. the request parameter must have the URP shortname prefixed
-
getMyName
protected String getMyName()
-
process
protected abstract void process(AddUpdateCommand cmd, SolrQueryRequest req, SolrQueryResponse rsp)
This object is reused across requests. So,this method should not store anything in the instance variable.
-
-