epugh commented on code in PR #4495:
URL: https://github.com/apache/solr/pull/4495#discussion_r3341417078


##########
solr/core/src/test/org/apache/solr/handler/component/DistributedCombinedQueryComponentTest.java:
##########
@@ -145,130 +123,119 @@ protected String getShardsString() {
   }
 
   /**
-   * Tests multiple lexical queries using the distributed solr client.
+   * Tests all combined query variants (single lexical, multiple lexical, 
sort, pagination,
+   * faceting, facet+highlighting) against the same 10-document index.
    *
    * @throws Exception if any error occurs during the test execution
    */
   @Test
-  public void testMultipleLexicalQuery() throws Exception {
+  public void testCombinedQueries() throws Exception {
     prepareIndexDocs();
-    String jsonQuery =
-        "{\"queries\":"
-            + "{\"lexical1\":{\"lucene\":{\"query\":\"id:(2^2 OR 3^1 OR 6^2 OR 
5^1)\"}},"
-            + "\"lexical2\":{\"lucene\":{\"query\":\"id:(4^1 OR 5^2 OR 7^3 OR 
10^2)\"}}},"
-            + "\"limit\":5,"
-            + "\"fields\":[\"id\",\"score\",\"title\"],"
-            + 
"\"params\":{\"combiner\":true,\"combiner.query\":[\"lexical1\",\"lexical2\"]}}";
-    QueryResponse rsp = query(CommonParams.JSON, jsonQuery, CommonParams.QT, 
"/search");
-    assertEquals(5, rsp.getResults().size());
-    assertFieldValues(rsp.getResults(), id, "5", "7", "2", "6", "3");
-  }
 
-  /**
-   * Test multiple query execution with sort.
-   *
-   * @throws Exception the exception
-   */
-  @Test
-  public void testMultipleQueryWithSort() throws Exception {
-    prepareIndexDocs();
-    String jsonQuery =
-        "{\"queries\":"
-            + "{\"lexical1\":{\"lucene\":{\"query\":\"id:(2^2 OR 3^1 OR 6^2 OR 
5^1)\"}},"
-            + "\"lexical2\":{\"lucene\":{\"query\":\"id:(4^1 OR 5^2 OR 7^3 OR 
10^2)\"}}},"
-            + "\"limit\":5,\"sort\":\"mod3_idv desc, score desc\""
-            + "\"fields\":[\"id\",\"score\",\"title\"],"
-            + 
"\"params\":{\"combiner\":true,\"combiner.query\":[\"lexical1\",\"lexical2\"]}}";
-    QueryResponse rsp = query(CommonParams.JSON, jsonQuery, CommonParams.QT, 
"/search");
-    assertEquals(5, rsp.getResults().size());
-    assertFieldValues(rsp.getResults(), id, "5", "2", "7", "10", "4");
-  }
-
-  /**
-   * Tests the hybrid query functionality of the system with various setting 
of pagination.
-   *
-   * @throws Exception if any unexpected error occurs during the test 
execution.
-   */
-  @Test
-  public void testHybridQueryWithPagination() throws Exception {
-    prepareIndexDocs();
+    // single lexical query
     QueryResponse rsp =
         query(
             CommonParams.JSON,
-            "{\"queries\":"
-                + "{\"lexical1\":{\"lucene\":{\"query\":\"id:(2^2 OR 3^1 OR 
6^2 OR 5^1)\"}},"
-                + "\"lexical2\":{\"lucene\":{\"query\":\"id:(4^1 OR 5^2 OR 7^3 
OR 10^2)\"}}},"
-                + "\"fields\":[\"id\",\"score\",\"title\"],"
-                + 
"\"params\":{\"combiner\":true,\"combiner.query\":[\"lexical1\",\"lexical2\"]}}",
+            """

Review Comment:
   I really like the use of `"""` as well...   Kind of wish we had one sweep 
through our code base for all this!



##########
solr/core/src/test/org/apache/solr/handler/tagger/RandomizedTaggerNightlyTest.java:
##########
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.handler.tagger;
+
+import com.carrotsearch.randomizedtesting.annotations.Repeat;
+import org.apache.lucene.tests.util.LuceneTestCase.Nightly;
+
+/** Nightly variant of {@link RandomizedTaggerTest} that runs the full 10 
iterations. */
+@Nightly
+@Repeat(iterations = 10)

Review Comment:
   I thought I had seem a pattern where you would change the number of 
iterations based on some system property?   Versus ahving seperate Java files?  
 



##########
solr/modules/s3-repository/src/test/org/apache/solr/s3/S3IncrementalBackupTest.java:
##########
@@ -30,6 +30,7 @@
 import software.amazon.awssdk.regions.Region;
 
 // Backups do checksum validation against a footer value not present in 
'SimpleText'
[email protected]

Review Comment:
   So we can't do anything to make this faster instead?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to