lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [06/50] [abbrv] lucene-solr:jira/solr-10262: SOLR-10601: StreamExpressionParser should handle white space around = in named parameters
Date Mon, 08 May 2017 15:26:23 GMT
SOLR-10601: StreamExpressionParser should handle white space around = in named parameters


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

Branch: refs/heads/jira/solr-10262
Commit: 17563ce81f26cb2844c60ba26b1627f6f7e8908d
Parents: b901d16
Author: Joel Bernstein <jbernste@apache.org>
Authored: Wed May 3 10:25:30 2017 -0400
Committer: Joel Bernstein <jbernste@apache.org>
Committed: Wed May 3 10:25:54 2017 -0400

----------------------------------------------------------------------
 .../solr/client/solrj/io/stream/expr/StreamExpressionParser.java   | 2 +-
 .../apache/solr/client/solrj/io/stream/StreamExpressionTest.java   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/17563ce8/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/expr/StreamExpressionParser.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/expr/StreamExpressionParser.java
b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/expr/StreamExpressionParser.java
index 294115a..fd5c9d3 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/expr/StreamExpressionParser.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/expr/StreamExpressionParser.java
@@ -147,7 +147,7 @@ public class StreamExpressionParser {
     int firstOpenEquals = findNextClear(clause, 0, '=');
     if(firstOpenEquals <= 0 || firstOpenEquals == clause.length() - 1){ return false;
}
     String name = clause.substring(0, firstOpenEquals);
-    if(!wordToken(name)){ return false; }
+    if(!wordToken(name.trim())){ return false; }
     
     return true;
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/17563ce8/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java
b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java
index 9ea8ca4..0af7935 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java
@@ -5359,7 +5359,7 @@ public class StreamExpressionTest extends SolrCloudTestCase {
     updateRequest.commit(cluster.getSolrClient(), COLLECTIONORALIAS);
 
     String expr = "search("+COLLECTIONORALIAS+", q=\"*:*\", fl=\"id,test_t, test_i\", sort=\"id
desc\")";
-    String cat = "let(a="+expr+", b=add(1,3), c=col(a, test_i), tuple(test=add(1,1), test1=b,
results=a, test2=add(c)))";
+    String cat = "let(a ="+expr+", b = add(1,3), c=col(a, test_i), tuple(test = add(1,1),
test1=b, results=a, test2=add(c)))";
     ModifiableSolrParams paramsLoc = new ModifiableSolrParams();
     paramsLoc.set("expr", cat);
     paramsLoc.set("qt", "/stream");


Mime
View raw message