SOLR-9657: Addressing test failures

This commit is contained in:
Noble Paul 2016-10-20 01:26:02 +05:30
parent c2e031add3
commit 6893595f34
2 changed files with 5 additions and 3 deletions

View File

@ -29,13 +29,14 @@ import org.apache.solr.update.AddUpdateCommand;
* This is deliberately made to support only the add operation
*/
public abstract class SimpleUpdateProcessorFactory extends UpdateRequestProcessorFactory {
protected final String myName;
protected final String myName; // if classname==XyzUpdateProcessorFactory myName=Xyz
protected NamedList initArgs = new NamedList();
private static ThreadLocal<SolrQueryRequest> REQ = new ThreadLocal<>();
protected SimpleUpdateProcessorFactory() {
String simpleName = this.getClass().getSimpleName();
this.myName = simpleName.substring(0, simpleName.indexOf("UpdateProcessorFactory"));
int idx = simpleName.indexOf("UpdateProcessorFactory");
this.myName = idx == -1 ? simpleName : simpleName.substring(0, idx);
}
@Override

View File

@ -29,7 +29,8 @@ import org.apache.solr.common.SolrInputDocument;
import org.apache.solr.request.SolrQueryRequest;
import org.apache.solr.response.SolrQueryResponse;
import org.apache.solr.update.AddUpdateCommand;
//Adds new fields to documents based on a template pattern specified via Template.field
// request parameters (multi-valued) or 'field' value specified in initArgs
public class TemplateUpdateProcessorFactory extends SimpleUpdateProcessorFactory {
@Override
protected void process(AddUpdateCommand cmd, SolrQueryRequest req, SolrQueryResponse rsp) {