public class DefaultValueUpdateProcessorFactory extends AbstractDefaultValueUpdateProcessorFactory
An update processor that adds a constant default value to any document being added that does not already have a value in the specified field.
In the example configuration below, if a document does not contain a value
in the price and/or type fields, it will be given
default values of 0.0 and/or unknown
(respectively).
<processor class="solr.DefaultValueUpdateProcessorFactory"> <str name="fieldName">price</str> <float name="value">0.0</float> </processor> <processor class="solr.DefaultValueUpdateProcessorFactory"> <str name="fieldName">type</str> <str name="value">unknown</str> </processor>
UpdateRequestProcessorFactory.RunAlways| Modifier and Type | Field and Description |
|---|---|
protected Object |
defaultValue |
fieldName| Constructor and Description |
|---|
DefaultValueUpdateProcessorFactory() |
| Modifier and Type | Method and Description |
|---|---|
UpdateRequestProcessor |
getInstance(SolrQueryRequest req,
SolrQueryResponse rsp,
UpdateRequestProcessor next) |
void |
init(NamedList args) |
protected Object defaultValue
public void init(NamedList args)
init in interface NamedListInitializedPlugininit in class AbstractDefaultValueUpdateProcessorFactorypublic UpdateRequestProcessor getInstance(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next)
getInstance in class UpdateRequestProcessorFactoryCopyright © 2000-2015 Apache Software Foundation. All Rights Reserved.