Skip to content

Commit

Permalink
no null params
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmiley committed Feb 5, 2025
1 parent 9610be6 commit 35057d1
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,8 @@ public Query createDomainQuery(FacetContext fcontext) {
// does...
wrappedFromQuery.setCache(false);

GraphQueryParser graphParser = new GraphQueryParser(null, localParams, null, fcontext.req);
GraphQueryParser graphParser =
new GraphQueryParser(null, localParams, fcontext.req.getParams(), fcontext.req);
try {
GraphQuery graphQuery = (GraphQuery) graphParser.parse();
graphQuery.setQ(wrappedFromQuery);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@

import java.io.StringWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.params.CommonParams;
import org.apache.solr.common.params.MapSolrParams;
import org.apache.solr.common.params.SolrParams;
import org.apache.solr.common.util.ContentStream;
import org.apache.solr.common.util.ContentStreamBase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import org.apache.solr.api.V2HttpCall.CompositeApi;
import org.apache.solr.client.solrj.SolrRequest;
import org.apache.solr.common.annotation.JsonProperty;
import org.apache.solr.common.params.MapSolrParams;
import org.apache.solr.common.params.ModifiableSolrParams;
import org.apache.solr.common.params.SolrParams;
import org.apache.solr.common.util.CommandOperation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ public void testEmptyCollectionDoesNotThrow() throws Exception {
QParserPlugin qParserPlugin =
QParserPlugin.standardPlugins.get(SignificantTermsQParserPlugin.NAME);
QParser parser =
qParserPlugin.createParser(
"", SolrParams.of("field", "cat"), SolrParams.of(), null);
qParserPlugin.createParser("", SolrParams.of("field", "cat"), SolrParams.of(), null);
AnalyticsQuery query = (AnalyticsQuery) parser.parse();
SolrQueryResponse resp = new SolrQueryResponse();

Expand Down Expand Up @@ -103,8 +102,7 @@ public void testCollectionWithDocuments() throws Exception {
Map<String, String> params = new HashMap<>();
params.put("field", "cat");
QParser parser =
qParserPlugin.createParser(
"", new MapSolrParams(params), SolrParams.of(), null);
qParserPlugin.createParser("", new MapSolrParams(params), SolrParams.of(), null);
AnalyticsQuery query = (AnalyticsQuery) parser.parse();
SolrQueryResponse resp = new SolrQueryResponse();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,8 @@ public void testBandsWrap() throws SyntaxError {
QParser qparser =
h.getCore()
.getQueryPlugin("minhash")
.createParser("1, 2, 3, 4, 5, 6, 7, 8, 9, 10", par.toSolrParams(), SolrParams.of(), null);
.createParser(
"1, 2, 3, 4, 5, 6, 7, 8, 9, 10", par.toSolrParams(), SolrParams.of(), null);
Query query = qparser.getQuery();

BooleanQuery bq = (BooleanQuery) query;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@

import java.lang.invoke.MethodHandles;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
import java.util.function.Function;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.client.solrj.util.ClientUtils;
import org.apache.solr.common.params.MapSolrParams;
import org.apache.solr.common.params.SolrParams;
import org.apache.solr.common.util.ContentStream;
import org.apache.solr.core.SolrCore;
Expand Down Expand Up @@ -231,8 +229,7 @@ private SolrQueryRequestBase constructBatchDeleteDocRequest(int batchSize) {
*/
private SolrQueryRequestBase constructBatchRequestHelper(
int batchSize, Function<Integer, String> requestFn) {
SolrQueryRequestBase updateReq =
new SolrQueryRequestBase(core, SolrParams.of()) {};
SolrQueryRequestBase updateReq = new SolrQueryRequestBase(core, SolrParams.of()) {};
List<String> docs = new ArrayList<>();
for (int i = 0; i < batchSize; i++) {
docs.add(requestFn.apply(i));
Expand Down

0 comments on commit 35057d1

Please sign in to comment.