public final class ConcatFieldUpdateProcessorFactory extends FieldMutatingUpdateProcessorFactory
delimiter
which defaults
to ",
".
By default, this processor concatenates the values for any field name
which according to the schema is multiValued="false"
and uses TextField
or StrField
For example, in the configuration below, any "single valued" string and
text field which is found to contain multiple values except for
the primary_author
field will be concatenated using the
string ";
" as a delimiter. For the
primary_author
field, the multiple values will be left
alone for FirstFieldValueUpdateProcessorFactory
to deal with.
<processor class="solr.ConcatFieldUpdateProcessorFactory"> <str name="delimiter">; </str> <lst name="exclude"> <str name="fieldName">primary_author</str> </lst> </processor> <processor class="solr.FirstFieldValueUpdateProcessorFactory"> <str name="fieldName">primary_author</str> </processor>
FieldMutatingUpdateProcessorFactory.SelectorParams
UpdateRequestProcessorFactory.RunAlways
Constructor and Description |
---|
ConcatFieldUpdateProcessorFactory() |
Modifier and Type | Method and Description |
---|---|
FieldMutatingUpdateProcessor.FieldNameSelector |
getDefaultSelector(SolrCore core)
Defines the default selection behavior when the user has not
configured any specific criteria for selecting fields.
|
UpdateRequestProcessor |
getInstance(SolrQueryRequest req,
SolrQueryResponse rsp,
UpdateRequestProcessor next) |
void |
init(NamedList args)
Handles common initialization related to source fields for
constructing the FieldNameSelector to be used.
|
getSelector, inform, parseSelectorExclusionParams, parseSelectorParams
public void init(NamedList args)
FieldMutatingUpdateProcessorFactory
init
in interface NamedListInitializedPlugin
init
in class FieldMutatingUpdateProcessorFactory
public UpdateRequestProcessor getInstance(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next)
getInstance
in class UpdateRequestProcessorFactory
public FieldMutatingUpdateProcessor.FieldNameSelector getDefaultSelector(SolrCore core)
FieldMutatingUpdateProcessorFactory
getDefaultSelector
in class FieldMutatingUpdateProcessorFactory
FieldMutatingUpdateProcessor.SELECT_ALL_FIELDS
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.