SOLR-10601: StreamExpressionParser should handle white space around = in named parameters

This commit is contained in:
Joel Bernstein 2017-05-03 10:25:30 -04:00
parent b901d16b9b
commit 17563ce81f
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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");