mirror of https://github.com/apache/lucene.git
SOLR-9118: HashQParserPlugin should trim partition keys
This commit is contained in:
parent
01ed4a5f7d
commit
93201cd07e
|
@ -69,6 +69,7 @@ public class HashQParserPlugin extends QParserPlugin {
|
|||
int workers = localParams.getInt("workers");
|
||||
int worker = localParams.getInt("worker");
|
||||
String keys = params.get("partitionKeys");
|
||||
keys = keys.replace(" ", "");
|
||||
return new HashQuery(keys, workers, worker);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -199,7 +199,7 @@ public class TestHashQParserPlugin extends SolrTestCaseJ4 {
|
|||
params = new ModifiableSolrParams();
|
||||
params.add("q", "*:*");
|
||||
params.add("fq", "{!hash worker=0 workers=2 cost="+getCost(random)+"}");
|
||||
params.add("partitionKeys", "a_s,a_i,a_l");
|
||||
params.add("partitionKeys", "a_s, a_i, a_l");
|
||||
params.add("rows","50");
|
||||
set1 = new HashSet();
|
||||
response = h.query(req(params));
|
||||
|
@ -217,7 +217,7 @@ public class TestHashQParserPlugin extends SolrTestCaseJ4 {
|
|||
params = new ModifiableSolrParams();
|
||||
params.add("q", "*:*");
|
||||
params.add("fq", "{!hash worker=1 workers=2 cost="+getCost(random)+"}");
|
||||
params.add("partitionKeys", "a_s,a_i,a_l");
|
||||
params.add("partitionKeys", "a_s, a_i, a_l");
|
||||
params.add("rows","50");
|
||||
set2 = new HashSet();
|
||||
response = h.query(req(params));
|
||||
|
|
Loading…
Reference in New Issue