code formatted
This commit is contained in:
parent
f8329bc110
commit
c9870c5122
|
@ -74,7 +74,6 @@ public class SolrConfigExploreTest extends SolrExploreTest {
|
||||||
.config(conf)
|
.config(conf)
|
||||||
.getOrCreate();
|
.getOrCreate();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterAll
|
@AfterAll
|
||||||
|
@ -87,7 +86,8 @@ public class SolrConfigExploreTest extends SolrExploreTest {
|
||||||
|
|
||||||
String inputPath = "src/test/resources/eu/dnetlib/dhp/oa/provision/xml";
|
String inputPath = "src/test/resources/eu/dnetlib/dhp/oa/provision/xml";
|
||||||
|
|
||||||
new XmlIndexingJob(spark, inputPath, FORMAT, batchSize, XmlIndexingJob.OutputFormat.SOLR, null).run(isLookupClient);
|
new XmlIndexingJob(spark, inputPath, FORMAT, batchSize, XmlIndexingJob.OutputFormat.SOLR, null)
|
||||||
|
.run(isLookupClient);
|
||||||
Assertions.assertEquals(0, miniCluster.getSolrClient().commit().getStatus());
|
Assertions.assertEquals(0, miniCluster.getSolrClient().commit().getStatus());
|
||||||
|
|
||||||
String[] queryStrings = {
|
String[] queryStrings = {
|
||||||
|
@ -108,7 +108,8 @@ public class SolrConfigExploreTest extends SolrExploreTest {
|
||||||
// System.out.println(rsp.getExplainMap());
|
// System.out.println(rsp.getExplainMap());
|
||||||
|
|
||||||
for (SolrDocument doc : rsp.getResults()) {
|
for (SolrDocument doc : rsp.getResults()) {
|
||||||
System.out.println(
|
System.out
|
||||||
|
.println(
|
||||||
doc.get("score") + "\t" +
|
doc.get("score") + "\t" +
|
||||||
doc.get("__indexrecordidentifier") + "\t" +
|
doc.get("__indexrecordidentifier") + "\t" +
|
||||||
doc.get("resultidentifier") + "\t" +
|
doc.get("resultidentifier") + "\t" +
|
||||||
|
@ -118,8 +119,7 @@ public class SolrConfigExploreTest extends SolrExploreTest {
|
||||||
doc.get("resulttitle") + "\t" +
|
doc.get("resulttitle") + "\t" +
|
||||||
doc.get("relprojectname") + "\t" +
|
doc.get("relprojectname") + "\t" +
|
||||||
doc.get("resultdescription") + "\t" +
|
doc.get("resultdescription") + "\t" +
|
||||||
doc.get("__all") + "\t"
|
doc.get("__all") + "\t");
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,6 @@ public class SolrConfigTest extends SolrTest {
|
||||||
.config(conf)
|
.config(conf)
|
||||||
.getOrCreate();
|
.getOrCreate();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterAll
|
@AfterAll
|
||||||
|
@ -96,7 +95,8 @@ public class SolrConfigTest extends SolrTest {
|
||||||
|
|
||||||
String inputPath = "src/test/resources/eu/dnetlib/dhp/oa/provision/xml";
|
String inputPath = "src/test/resources/eu/dnetlib/dhp/oa/provision/xml";
|
||||||
|
|
||||||
new XmlIndexingJob(spark, inputPath, FORMAT, batchSize, XmlIndexingJob.OutputFormat.SOLR, null).run(isLookupClient);
|
new XmlIndexingJob(spark, inputPath, FORMAT, batchSize, XmlIndexingJob.OutputFormat.SOLR, null)
|
||||||
|
.run(isLookupClient);
|
||||||
Assertions.assertEquals(0, miniCluster.getSolrClient().commit().getStatus());
|
Assertions.assertEquals(0, miniCluster.getSolrClient().commit().getStatus());
|
||||||
|
|
||||||
String[] queryStrings = {
|
String[] queryStrings = {
|
||||||
|
@ -113,7 +113,8 @@ public class SolrConfigTest extends SolrTest {
|
||||||
QueryResponse rsp = miniCluster.getSolrClient().query(query);
|
QueryResponse rsp = miniCluster.getSolrClient().query(query);
|
||||||
|
|
||||||
for (SolrDocument doc : rsp.getResults()) {
|
for (SolrDocument doc : rsp.getResults()) {
|
||||||
System.out.println(
|
System.out
|
||||||
|
.println(
|
||||||
doc.get("score") + "\t" +
|
doc.get("score") + "\t" +
|
||||||
doc.get("__indexrecordidentifier") + "\t" +
|
doc.get("__indexrecordidentifier") + "\t" +
|
||||||
doc.get("resultidentifier") + "\t" +
|
doc.get("resultidentifier") + "\t" +
|
||||||
|
@ -123,8 +124,7 @@ public class SolrConfigTest extends SolrTest {
|
||||||
doc.get("resulttitle") + "\t" +
|
doc.get("resulttitle") + "\t" +
|
||||||
doc.get("relprojectname") + "\t" +
|
doc.get("relprojectname") + "\t" +
|
||||||
doc.get("resultdescription") + "\t" +
|
doc.get("resultdescription") + "\t" +
|
||||||
doc.get("__all") + "\t"
|
doc.get("__all") + "\t");
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue