Skip to content

Commit

Permalink
fix nocommit
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmiley committed Jan 27, 2025
1 parent bfdec90 commit 04eac02
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.response.QueryResponse;
import org.apache.solr.common.params.CommonParams;
import org.apache.solr.common.params.ModifiableSolrParams;
import org.apache.solr.common.params.SolrParams;

/**
Expand All @@ -32,7 +31,7 @@ public class QueryRequest extends CollectionRequiringSolrRequest<QueryResponse>

public QueryRequest() {
super(METHOD.GET, null);
query = new ModifiableSolrParams(); // TODO SolrParams.of()
query = SolrParams.of();
}

public QueryRequest(SolrParams q) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -722,36 +722,36 @@ protected void test() throws Exception {
newSearcherHook.waitForSearcher(DEFAULT_COLLECTION, 2, 20000, false);

assertSliceCounts("deleteById commitWithin did not work", before + 1, dColl);
// NOCOMMIT
// // try deleteByQuery commitWithin
// UpdateRequest deleteByQueryReq = new UpdateRequest();
// deleteByQueryReq.deleteByQuery("id:301");
// deleteByQueryReq.setCommitWithin(10);
// deleteByQueryReq.process(cloudClient);
//
// newSearcherHook.waitForSearcher(DEFAULT_COLLECTION, 2, 20000, false);
//
// assertSliceCounts("deleteByQuery commitWithin did not work", before, dColl);
//
// // TODO: This test currently fails because debug info is obtained only
// // on shards with matches.
// // query("q","matchesnothing","fl","*,score", "debugQuery", "true");
//
// // would be better if these where all separate tests - but much, much
// // slower
// doOptimisticLockingAndUpdating();
// testShardParamVariations();
// testMultipleCollections();
// testANewCollectionInOneInstance();
// testSearchByCollectionName();
// testUpdateByCollectionName();
// testANewCollectionInOneInstanceWithManualShardAssignement();
// testNumberOfCommitsWithCommitAfterAdd();
//
// testUpdateProcessorsRunOnlyOnce("distrib-dup-test-chain-explicit");
// testUpdateProcessorsRunOnlyOnce("distrib-dup-test-chain-implicit");
//
// testStopAndStartCoresInOneInstance();

// try deleteByQuery commitWithin
UpdateRequest deleteByQueryReq = new UpdateRequest();
deleteByQueryReq.deleteByQuery("id:301");
deleteByQueryReq.setCommitWithin(10);
deleteByQueryReq.process(cloudClient);

newSearcherHook.waitForSearcher(DEFAULT_COLLECTION, 2, 20000, false);

assertSliceCounts("deleteByQuery commitWithin did not work", before, dColl);

// TODO: This test currently fails because debug info is obtained only
// on shards with matches.
// query("q","matchesnothing","fl","*,score", "debugQuery", "true");

// would be better if these where all separate tests - but much, much
// slower
doOptimisticLockingAndUpdating();
testShardParamVariations();
testMultipleCollections();
testANewCollectionInOneInstance();
testSearchByCollectionName();
testUpdateByCollectionName();
testANewCollectionInOneInstanceWithManualShardAssignement();
testNumberOfCommitsWithCommitAfterAdd();

testUpdateProcessorsRunOnlyOnce("distrib-dup-test-chain-explicit");
testUpdateProcessorsRunOnlyOnce("distrib-dup-test-chain-implicit");

testStopAndStartCoresInOneInstance();
}

private void testSortableTextFaceting() throws Exception {
Expand Down

0 comments on commit 04eac02

Please sign in to comment.