Skip to content

Apache Lucene open-source search software

SOLR-6295: Fix child filter query creation to never match parent docs in SolrExampleTests

Shalin Shekhar Mangar232c2ec167b8
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index b7a1d860d2d..d933f9e9ba0 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -352,6 +352,9 @@ Other Changes
* SOLR-6641: SystemInfoHandler should include the zkHost the node is using (when running in solrcloud mode)
(Timothy Potter)
+* SOLR-6295: Fix child filter query creation to never match parent docs in SolrExampleTests.
+ (Varun Thacker, Mikhail Khludnev via shalin)
+
================== 4.10.1 ==================
Bug Fixes
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java b/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java
index bc9cccf032c..d47698a462f 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java
@@ -1354,7 +1354,7 @@ abstract public class SolrExampleTests extends SolrExampleTestsBase
// verifications are driven only by the results
{
int parentLevel = TestUtil.nextInt(random(), 0, maxDepth-1);
- int kidLevelMin = TestUtil.nextInt(random(), parentLevel, maxDepth);
+ int kidLevelMin = TestUtil.nextInt(random(), parentLevel + 1, maxDepth);
int kidLevelMax = TestUtil.nextInt(random(), kidLevelMin, maxDepth);
String parentFilter = "level_i:" + parentLevel;
@@ -1478,7 +1478,7 @@ abstract public class SolrExampleTests extends SolrExampleTestsBase
private int idCounter = 0;
/** used by genNestedDocuments */
private static final String[] names
- = new String[] { "java","pyhon","scala","ruby","clojure" };
+ = new String[] { "java","python","scala","ruby","clojure" };
/**
* recursive method for generating a document, which may also have child documents;