SOLR-4249: remove legacy UniqFieldsUpdateProcessorFactory init param syntax from trunk for 5.0

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1518836 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris M. Hostetter 2013-08-29 21:40:55 +00:00
parent c50cec7855
commit 6f0040797e
3 changed files with 9 additions and 20 deletions

View File

@ -33,8 +33,13 @@ Apache ZooKeeper 3.4.5
Upgrading from Solr 4.x
----------------------
The "file" attribute of infoStream in solrconfig.xml is removed. Control this
via your logging configuration (org.apache.solr.update.LoggingInfoStream) instead.
* The "file" attribute of infoStream in solrconfig.xml is removed. Control this
via your logging configuration (org.apache.solr.update.LoggingInfoStream) instead.
* UniqFieldsUpdateProcessorFactory no longer supports the <lst named="fields"> init
param style that was deprecated in Solr 4.5. If you are still using this syntax,
update your configs to use <arr name="fieldName"> instead. See SOLR-4249 for more
details.
Detailed Change List
----------------------

View File

@ -67,22 +67,6 @@ public class UniqFieldsUpdateProcessorFactory extends FieldValueSubsetUpdateProc
return FieldMutatingUpdateProcessor.SELECT_NO_FIELDS;
}
@SuppressWarnings("unchecked")
@Override
public void init(@SuppressWarnings("rawtypes") NamedList args) {
// legacy init param support, will be removed in 5.0
// no idea why this was ever implimented as <lst> should have just been <arr>
NamedList<String> flst = (NamedList<String>) args.remove("fields");
if(flst != null){
log.warn("Use of the 'fields' init param in UniqFieldsUpdateProcessorFactory is deprecated, please use 'fieldName' (or another FieldMutatingUpdateProcessorFactory selector option) instead");
log.info("Replacing 'fields' init param with (individual) 'fieldName' params");
for (Map.Entry<String,String> entry : flst) {
args.add("fieldName", entry.getValue());
}
}
super.init(args);
}
@Override
@SuppressWarnings("unchecked")
public Collection pickSubset(Collection values) {

View File

@ -518,11 +518,11 @@
</updateRequestProcessorChain>
<updateRequestProcessorChain name="uniq-fields">
<processor class="org.apache.solr.update.processor.UniqFieldsUpdateProcessorFactory">
<lst name="fields">
<arr name="fieldName">
<str>uniq</str>
<str>uniq2</str>
<str>uniq3</str>
</lst>
</arr>
</processor>
<processor class="solr.RunUpdateProcessorFactory" />
</updateRequestProcessorChain>