lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cpoersc...@apache.org
Subject [15/50] [abbrv] lucene-solr:jira/solr-8542-v2: SOLR-9657: Addressing test failures
Date Mon, 24 Oct 2016 18:32:19 GMT
SOLR-9657: Addressing test failures


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/6893595f
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/6893595f
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/6893595f

Branch: refs/heads/jira/solr-8542-v2
Commit: 6893595f340b748a9c5e5c3884704e71275deab4
Parents: c2e031a
Author: Noble Paul <noble.paul@gmail.com>
Authored: Thu Oct 20 01:26:02 2016 +0530
Committer: Noble Paul <noble.paul@gmail.com>
Committed: Thu Oct 20 01:26:02 2016 +0530

----------------------------------------------------------------------
 .../solr/update/processor/SimpleUpdateProcessorFactory.java     | 5 +++--
 .../solr/update/processor/TemplateUpdateProcessorFactory.java   | 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6893595f/solr/core/src/java/org/apache/solr/update/processor/SimpleUpdateProcessorFactory.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/update/processor/SimpleUpdateProcessorFactory.java
b/solr/core/src/java/org/apache/solr/update/processor/SimpleUpdateProcessorFactory.java
index aec9d87..b1edea0 100644
--- a/solr/core/src/java/org/apache/solr/update/processor/SimpleUpdateProcessorFactory.java
+++ b/solr/core/src/java/org/apache/solr/update/processor/SimpleUpdateProcessorFactory.java
@@ -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

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6893595f/solr/core/src/java/org/apache/solr/update/processor/TemplateUpdateProcessorFactory.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/update/processor/TemplateUpdateProcessorFactory.java
b/solr/core/src/java/org/apache/solr/update/processor/TemplateUpdateProcessorFactory.java
index 41d109b..dbe61b4 100644
--- a/solr/core/src/java/org/apache/solr/update/processor/TemplateUpdateProcessorFactory.java
+++ b/solr/core/src/java/org/apache/solr/update/processor/TemplateUpdateProcessorFactory.java
@@ -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)
{


Mime
View raw message