Skip to content

Commit

Permalink
Revert "just adding logs to catch the failure"
Browse files Browse the repository at this point in the history
This reverts commit 2198eda.
  • Loading branch information
mkhludnev committed Feb 25, 2024
1 parent ffcb8b5 commit 70ac7e5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,8 @@ Iterable<Document> makeLuceneDocs() {
// instead.
}

List<Document> out = new ArrayList<>();
for (SolrInputDocument sid: all) {
final Document document = DocumentBuilder.toDocument(sid, req.getSchema());
System.out.println(document);
out.add( document);
}
return () ->out.iterator();
return () ->
all.stream().map(sdoc -> DocumentBuilder.toDocument(sdoc, req.getSchema())).iterator();
}

private void addRootField(SolrInputDocument sdoc, String rootId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
<statsCache class="${solr.statsCache:}"/>

<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<indexConfig><infoStream>true</infoStream></indexConfig>

<updateHandler class="solr.DirectUpdateHandler2">

Expand Down
23 changes: 9 additions & 14 deletions solr/core/src/test/org/apache/solr/search/join/BJQParserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import org.apache.solr.util.BaseTestHarness;
import org.junit.After;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;

public class BJQParserTest extends SolrTestCaseJ4 {
Expand Down Expand Up @@ -74,22 +73,19 @@ public static void createIndex() {
"</doc>",
updBlock.subList(0, updBlock.size() - 1).toString().replaceAll("[\\[\\]]", "")
+ "</doc>");
System.out.println(parentDoc.xml);
assertU(add(parentDoc));
assertQ(req("q", "*:*", "sort","_docid_ asc", "rows", "100", "indent", "on", "fl","*,[docid]", "wt", "csv"));

if (random().nextBoolean()) {
assertU(commit());
assertQ(req("q", "*:*", "sort","_docid_ asc", "rows", "100", "indent", "on", "fl","*,[docid]", "wt", "csv"), "//*[@numFound='" + i + "']");
// force empty segment (actually, this will no longer create an empty segment, only a new
// segments_n)
if (random().nextBoolean()) {
assertU(commit());
assertQ(req("q", "*:*", "sort","_docid_ asc", "rows", "100", "indent", "on", "fl","*,[docid]", "wt", "csv"), "//*[@numFound='" + i + "']");
}
}
}
assertU(commit());
assertQ(req("q", "*:*", "sort","_docid_ asc", "rows", "100", "indent", "on", "fl","*,[docid]", "wt", "csv"), "//*[@numFound='" + i + "']");
assertQ(req("q", "*:*"), "//*[@numFound='" + i + "']");
}

private static List<List<String[]>> createBlocks() {
Expand Down Expand Up @@ -240,12 +236,11 @@ public void testScoreNoneScoringForParent() {
+ (rarely() ? "" : (rarely() ? "score=None" : "score=none"))
+ "}child_s:l",
"fl",
"score,*,[docid]","debugQuery","true", "explainOther","id:6", "indent", "on",
"sort","_docid_ asc"),
"score"),
"//*[@numFound='6']",
"(//float[@name='score'])[" + (random().nextInt(6) + 1) + "]=0.0");
}
@Ignore

public void testWrongScoreExceptionForParent() {
final String aMode = ScoreMode.values()[random().nextInt(ScoreMode.values().length)].name();
final String wrongMode =
Expand Down Expand Up @@ -297,7 +292,7 @@ private String getLeastScore(String query) throws Exception {
resp, "(//float[@name='score'])[1]/text()", XPathConstants.STRING);
}

@Test @Ignore
@Test
public void testFq() {
assertQ(
req(
Expand Down Expand Up @@ -326,7 +321,7 @@ public void testFq() {
beParents);
}

@Test @Ignore
@Test
public void testIntersectParentBqChildBq() {

assertQ(
Expand Down Expand Up @@ -372,7 +367,7 @@ public void testGrandChildren() {
beParents);
}

@Test @Ignore
@Test
public void testChildrenParser() {
assertQ(
req("q", "{!child of=\"parent_s:[* TO *]\"}parent_s:a", "fq", "NOT grand_s:[* TO *]"),
Expand All @@ -393,7 +388,7 @@ public void testChildrenParser() {
"//doc/arr[@name=\"child_s\"]/str='l'");
}

@Test @Ignore
@Test
public void testCacheHit() {

MetricsMap parentFilterCache =
Expand Down Expand Up @@ -622,7 +617,7 @@ public void testFilters() {
"//*[@numFound='42']");
}

@Test @Ignore
@Test
public void testFiltersCache() throws SyntaxError, IOException {
final String[] elFilterQuery =
new String[] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ public static void assertQ(String message, SolrQueryRequest req, String... tests
xmlWriterTypeParams.set("indent", xmlWriterTypeParams.get("indent", "off"));
req.setParams(xmlWriterTypeParams);
String response = h.query(req);
System.out.println(response);

if (req.getParams().getBool("facet", false)) {
// add a test to ensure that faceting did not throw an exception
// internally, where it would be added to facet_counts/exception
Expand Down

0 comments on commit 70ac7e5

Please sign in to comment.