updated index feeding procedure to exploit the collection aliases
This commit is contained in:
parent
6055212f77
commit
1c30eacac2
|
@ -40,9 +40,6 @@ public class SolrAdminApplication implements Closeable {
|
||||||
final String isLookupUrl = parser.get("isLookupUrl");
|
final String isLookupUrl = parser.get("isLookupUrl");
|
||||||
log.info("isLookupUrl: {}", isLookupUrl);
|
log.info("isLookupUrl: {}", isLookupUrl);
|
||||||
|
|
||||||
final String format = parser.get("format");
|
|
||||||
log.info("format: {}", format);
|
|
||||||
|
|
||||||
final Action action = Action.valueOf(parser.get("action"));
|
final Action action = Action.valueOf(parser.get("action"));
|
||||||
log.info("action: {}", action);
|
log.info("action: {}", action);
|
||||||
|
|
||||||
|
@ -60,9 +57,6 @@ public class SolrAdminApplication implements Closeable {
|
||||||
final String zkHost = isLookup.getZkHost();
|
final String zkHost = isLookup.getZkHost();
|
||||||
log.info("zkHost: {}", zkHost);
|
log.info("zkHost: {}", zkHost);
|
||||||
|
|
||||||
final String collection = ProvisionConstants.getCollectionName(format);
|
|
||||||
log.info("collection: {}", collection);
|
|
||||||
|
|
||||||
final String publicFormat = parser.get("publicFormat");
|
final String publicFormat = parser.get("publicFormat");
|
||||||
log.info("publicFormat: {}", publicFormat);
|
log.info("publicFormat: {}", publicFormat);
|
||||||
|
|
||||||
|
@ -77,7 +71,7 @@ public class SolrAdminApplication implements Closeable {
|
||||||
log.info("shadowCollection: {}", shadowCollection);
|
log.info("shadowCollection: {}", shadowCollection);
|
||||||
|
|
||||||
try (SolrAdminApplication app = new SolrAdminApplication(zkHost)) {
|
try (SolrAdminApplication app = new SolrAdminApplication(zkHost)) {
|
||||||
app.execute(action, collection, query, commit, publicCollection, shadowCollection);
|
app.execute(action, query, commit, publicCollection, shadowCollection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,24 +80,24 @@ public class SolrAdminApplication implements Closeable {
|
||||||
this.solrClient = new CloudSolrClient.Builder(zk.getHosts(), zk.getChroot()).build();
|
this.solrClient = new CloudSolrClient.Builder(zk.getHosts(), zk.getChroot()).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SolrResponse commit(String collection) throws IOException, SolrServerException {
|
public SolrResponse commit(String shadowCollection) throws IOException, SolrServerException {
|
||||||
return execute(Action.COMMIT, collection, null, true, null, null);
|
return execute(Action.COMMIT, null, true, null, shadowCollection);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SolrResponse execute(Action action, String collection, String query, boolean commit,
|
public SolrResponse execute(Action action, String query, boolean commit,
|
||||||
String publicCollection, String shadowCollection)
|
String publicCollection, String shadowCollection)
|
||||||
throws IOException, SolrServerException {
|
throws IOException, SolrServerException {
|
||||||
switch (action) {
|
switch (action) {
|
||||||
|
|
||||||
case DELETE_BY_QUERY:
|
case DELETE_BY_QUERY:
|
||||||
UpdateResponse rsp = solrClient.deleteByQuery(collection, query);
|
UpdateResponse rsp = solrClient.deleteByQuery(shadowCollection, query);
|
||||||
if (commit) {
|
if (commit) {
|
||||||
return solrClient.commit(collection);
|
return solrClient.commit(shadowCollection);
|
||||||
}
|
}
|
||||||
return rsp;
|
return rsp;
|
||||||
|
|
||||||
case COMMIT:
|
case COMMIT:
|
||||||
return solrClient.commit(collection);
|
return solrClient.commit(shadowCollection);
|
||||||
|
|
||||||
case UPDATE_ALIASES:
|
case UPDATE_ALIASES:
|
||||||
this.updateAliases(publicCollection, shadowCollection);
|
this.updateAliases(publicCollection, shadowCollection);
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class SolrRecordDumpJob extends AbstractSolrRecordTransformJob {
|
||||||
|
|
||||||
private final String inputPath;
|
private final String inputPath;
|
||||||
|
|
||||||
private final String format;
|
private final String shadowFormat;
|
||||||
|
|
||||||
private final String outputPath;
|
private final String outputPath;
|
||||||
|
|
||||||
|
@ -61,8 +61,8 @@ public class SolrRecordDumpJob extends AbstractSolrRecordTransformJob {
|
||||||
final String inputPath = parser.get("inputPath");
|
final String inputPath = parser.get("inputPath");
|
||||||
log.info("inputPath: {}", inputPath);
|
log.info("inputPath: {}", inputPath);
|
||||||
|
|
||||||
final String format = parser.get("format");
|
final String shadowFormat = parser.get("shadowFormat");
|
||||||
log.info("format: {}", format);
|
log.info("shadowFormat: {}", shadowFormat);
|
||||||
|
|
||||||
final String outputPath = Optional
|
final String outputPath = Optional
|
||||||
.ofNullable(parser.get("outputPath"))
|
.ofNullable(parser.get("outputPath"))
|
||||||
|
@ -95,27 +95,24 @@ public class SolrRecordDumpJob extends AbstractSolrRecordTransformJob {
|
||||||
final String isLookupUrl = parser.get("isLookupUrl");
|
final String isLookupUrl = parser.get("isLookupUrl");
|
||||||
log.info("isLookupUrl: {}", isLookupUrl);
|
log.info("isLookupUrl: {}", isLookupUrl);
|
||||||
final ISLookupClient isLookup = new ISLookupClient(ISLookupClientFactory.getLookUpService(isLookupUrl));
|
final ISLookupClient isLookup = new ISLookupClient(ISLookupClientFactory.getLookUpService(isLookupUrl));
|
||||||
new SolrRecordDumpJob(spark, inputPath, format, outputPath).run(isLookup);
|
new SolrRecordDumpJob(spark, inputPath, shadowFormat, outputPath).run(isLookup);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public SolrRecordDumpJob(SparkSession spark, String inputPath, String format, String outputPath) {
|
public SolrRecordDumpJob(SparkSession spark, String inputPath, String shadowFormat, String outputPath) {
|
||||||
this.spark = spark;
|
this.spark = spark;
|
||||||
this.inputPath = inputPath;
|
this.inputPath = inputPath;
|
||||||
this.format = format;
|
this.shadowFormat = shadowFormat;
|
||||||
this.outputPath = outputPath;
|
this.outputPath = outputPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run(ISLookupClient isLookup) throws ISLookUpException, TransformerException {
|
public void run(ISLookupClient isLookup) throws ISLookUpException, TransformerException {
|
||||||
final String fields = isLookup.getLayoutSource(format);
|
final String fields = isLookup.getLayoutSource(shadowFormat);
|
||||||
log.info("fields: {}", fields);
|
log.info("fields: {}", fields);
|
||||||
|
|
||||||
final String xslt = isLookup.getLayoutTransformer();
|
final String xslt = isLookup.getLayoutTransformer();
|
||||||
|
|
||||||
final String dsId = isLookup.getDsId(format);
|
final String indexRecordXslt = getLayoutTransformer(shadowFormat, fields, xslt);
|
||||||
log.info("dsId: {}", dsId);
|
|
||||||
|
|
||||||
final String indexRecordXslt = getLayoutTransformer(format, fields, xslt);
|
|
||||||
log.info("indexRecordTransformer {}", indexRecordXslt);
|
log.info("indexRecordTransformer {}", indexRecordXslt);
|
||||||
|
|
||||||
final Encoder<TupleWrapper> encoder = Encoders.bean(TupleWrapper.class);
|
final Encoder<TupleWrapper> encoder = Encoders.bean(TupleWrapper.class);
|
||||||
|
|
|
@ -40,6 +40,8 @@ public class XmlIndexingJob extends AbstractSolrRecordTransformJob {
|
||||||
|
|
||||||
private final String format;
|
private final String format;
|
||||||
|
|
||||||
|
private final String shadowCollection;
|
||||||
|
|
||||||
private final int batchSize;
|
private final int batchSize;
|
||||||
|
|
||||||
private final SparkSession spark;
|
private final SparkSession spark;
|
||||||
|
@ -63,8 +65,11 @@ public class XmlIndexingJob extends AbstractSolrRecordTransformJob {
|
||||||
final String inputPath = parser.get("inputPath");
|
final String inputPath = parser.get("inputPath");
|
||||||
log.info("inputPath: {}", inputPath);
|
log.info("inputPath: {}", inputPath);
|
||||||
|
|
||||||
final String format = parser.get("format");
|
final String shadowFormat = parser.get("shadowFormat");
|
||||||
log.info("format: {}", format);
|
log.info("shadowFormat: {}", shadowFormat);
|
||||||
|
|
||||||
|
final String shadowCollection = ProvisionConstants.getCollectionName(shadowFormat);
|
||||||
|
log.info("shadowCollection: {}", shadowCollection);
|
||||||
|
|
||||||
final Integer batchSize = Optional
|
final Integer batchSize = Optional
|
||||||
.ofNullable(parser.get("batchSize"))
|
.ofNullable(parser.get("batchSize"))
|
||||||
|
@ -85,15 +90,17 @@ public class XmlIndexingJob extends AbstractSolrRecordTransformJob {
|
||||||
final String isLookupUrl = parser.get("isLookupUrl");
|
final String isLookupUrl = parser.get("isLookupUrl");
|
||||||
log.info("isLookupUrl: {}", isLookupUrl);
|
log.info("isLookupUrl: {}", isLookupUrl);
|
||||||
final ISLookupClient isLookup = new ISLookupClient(ISLookupClientFactory.getLookUpService(isLookupUrl));
|
final ISLookupClient isLookup = new ISLookupClient(ISLookupClientFactory.getLookUpService(isLookupUrl));
|
||||||
new XmlIndexingJob(spark, inputPath, format, batchSize)
|
new XmlIndexingJob(spark, inputPath, shadowFormat, shadowCollection, batchSize)
|
||||||
.run(isLookup);
|
.run(isLookup);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public XmlIndexingJob(SparkSession spark, String inputPath, String format, Integer batchSize) {
|
public XmlIndexingJob(SparkSession spark, String inputPath, String format, String shadowCollection,
|
||||||
|
Integer batchSize) {
|
||||||
this.spark = spark;
|
this.spark = spark;
|
||||||
this.inputPath = inputPath;
|
this.inputPath = inputPath;
|
||||||
this.format = format;
|
this.format = format;
|
||||||
|
this.shadowCollection = shadowCollection;
|
||||||
this.batchSize = batchSize;
|
this.batchSize = batchSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,12 +110,6 @@ public class XmlIndexingJob extends AbstractSolrRecordTransformJob {
|
||||||
|
|
||||||
final String xslt = isLookup.getLayoutTransformer();
|
final String xslt = isLookup.getLayoutTransformer();
|
||||||
|
|
||||||
final String dsId = isLookup.getDsId(format);
|
|
||||||
log.info("dsId: {}", dsId);
|
|
||||||
|
|
||||||
final String collection = ProvisionConstants.getCollectionName(format);
|
|
||||||
log.info("collection: {}", collection);
|
|
||||||
|
|
||||||
final String zkHost = isLookup.getZkHost();
|
final String zkHost = isLookup.getZkHost();
|
||||||
log.info("zkHost: {}", zkHost);
|
log.info("zkHost: {}", zkHost);
|
||||||
|
|
||||||
|
@ -130,7 +131,7 @@ public class XmlIndexingJob extends AbstractSolrRecordTransformJob {
|
||||||
.javaRDD()
|
.javaRDD()
|
||||||
.map(
|
.map(
|
||||||
t -> new StreamingInputDocumentFactory().parseDocument(t.getXml(), t.getJson()));
|
t -> new StreamingInputDocumentFactory().parseDocument(t.getXml(), t.getJson()));
|
||||||
DHPSolrSupport.indexDocs(zkHost, collection, batchSize, docs.rdd());
|
DHPSolrSupport.indexDocs(zkHost, shadowCollection, batchSize, docs.rdd());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"paramName": "f",
|
"paramName": "f",
|
||||||
"paramLongName": "format",
|
"paramLongName": "shadowFormat",
|
||||||
"paramDescription": "MDFormat name found in the IS profile",
|
"paramDescription": "MDFormat name found in the IS profile",
|
||||||
"paramRequired": true
|
"paramRequired": true
|
||||||
},
|
},
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"paramName": "f",
|
"paramName": "f",
|
||||||
"paramLongName": "format",
|
"paramLongName": "shadowFormat",
|
||||||
"paramDescription": "MDFormat name found in the IS profile",
|
"paramDescription": "MDFormat name found in the IS profile bound to the shadow index collection to feed",
|
||||||
"paramRequired": true
|
"paramRequired": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,12 +5,6 @@
|
||||||
"paramDescription": "the URL to the ISLookUp Service",
|
"paramDescription": "the URL to the ISLookUp Service",
|
||||||
"paramRequired": true
|
"paramRequired": true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"paramName": "f",
|
|
||||||
"paramLongName": "format",
|
|
||||||
"paramDescription": "metadata format profile name",
|
|
||||||
"paramRequired": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"paramName": "a",
|
"paramName": "a",
|
||||||
"paramLongName": "action",
|
"paramLongName": "action",
|
||||||
|
|
|
@ -35,9 +35,13 @@
|
||||||
<description>maximum number of relations allowed for a each entity grouping by target</description>
|
<description>maximum number of relations allowed for a each entity grouping by target</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>format</name>
|
<name>shadowFormat</name>
|
||||||
<description>metadata format name (DMF|TMF)</description>
|
<description>metadata format name (DMF|TMF)</description>
|
||||||
</property>
|
</property>
|
||||||
|
<property>
|
||||||
|
<name>publicFormat</name>
|
||||||
|
<description>the public metadata format - used to create the public collection alias</description>
|
||||||
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>batchSize</name>
|
<name>batchSize</name>
|
||||||
<description>number of records to be included in each indexing request</description>
|
<description>number of records to be included in each indexing request</description>
|
||||||
|
@ -110,14 +114,6 @@
|
||||||
<name>sparkNetworkTimeout</name>
|
<name>sparkNetworkTimeout</name>
|
||||||
<description>configures spark.network.timeout</description>
|
<description>configures spark.network.timeout</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
|
||||||
<name>publicFormat</name>
|
|
||||||
<description>the public metadata format - used to create the public collection alias</description>
|
|
||||||
</property>
|
|
||||||
<property>
|
|
||||||
<name>shadowFormat</name>
|
|
||||||
<description>the shadow metadata format - used to create the shadow collection alias</description>
|
|
||||||
</property>
|
|
||||||
</parameters>
|
</parameters>
|
||||||
|
|
||||||
<global>
|
<global>
|
||||||
|
@ -650,8 +646,8 @@
|
||||||
</configuration>
|
</configuration>
|
||||||
<main-class>eu.dnetlib.dhp.oa.provision.SolrAdminApplication</main-class>
|
<main-class>eu.dnetlib.dhp.oa.provision.SolrAdminApplication</main-class>
|
||||||
<arg>--isLookupUrl</arg><arg>${isLookupUrl}</arg>
|
<arg>--isLookupUrl</arg><arg>${isLookupUrl}</arg>
|
||||||
<arg>--format</arg><arg>${format}</arg>
|
|
||||||
<arg>--action</arg><arg>DELETE_BY_QUERY</arg>
|
<arg>--action</arg><arg>DELETE_BY_QUERY</arg>
|
||||||
|
<arg>--shadowFormat</arg><arg>${shadowFormat}</arg>
|
||||||
<arg>--query</arg><arg>${solrDeletionQuery}</arg>
|
<arg>--query</arg><arg>${solrDeletionQuery}</arg>
|
||||||
<arg>--commit</arg><arg>true</arg>
|
<arg>--commit</arg><arg>true</arg>
|
||||||
</java>
|
</java>
|
||||||
|
@ -681,7 +677,7 @@
|
||||||
</spark-opts>
|
</spark-opts>
|
||||||
<arg>--inputPath</arg><arg>${workingDir}/xml_json</arg>
|
<arg>--inputPath</arg><arg>${workingDir}/xml_json</arg>
|
||||||
<arg>--isLookupUrl</arg><arg>${isLookupUrl}</arg>
|
<arg>--isLookupUrl</arg><arg>${isLookupUrl}</arg>
|
||||||
<arg>--format</arg><arg>${format}</arg>
|
<arg>--shadowFormat</arg><arg>${shadowFormat}</arg>
|
||||||
<arg>--batchSize</arg><arg>${batchSize}</arg>
|
<arg>--batchSize</arg><arg>${batchSize}</arg>
|
||||||
</spark>
|
</spark>
|
||||||
<ok to="commit_solr_collection"/>
|
<ok to="commit_solr_collection"/>
|
||||||
|
@ -698,7 +694,7 @@
|
||||||
</configuration>
|
</configuration>
|
||||||
<main-class>eu.dnetlib.dhp.oa.provision.SolrAdminApplication</main-class>
|
<main-class>eu.dnetlib.dhp.oa.provision.SolrAdminApplication</main-class>
|
||||||
<arg>--isLookupUrl</arg><arg>${isLookupUrl}</arg>
|
<arg>--isLookupUrl</arg><arg>${isLookupUrl}</arg>
|
||||||
<arg>--format</arg><arg>${format}</arg>
|
<arg>--shadowFormat</arg><arg>${shadowFormat}</arg>
|
||||||
<arg>--action</arg><arg>COMMIT</arg>
|
<arg>--action</arg><arg>COMMIT</arg>
|
||||||
</java>
|
</java>
|
||||||
<ok to="End"/>
|
<ok to="End"/>
|
||||||
|
@ -723,7 +719,7 @@
|
||||||
</spark-opts>
|
</spark-opts>
|
||||||
<arg>--inputPath</arg><arg>${workingDir}/xml_json</arg>
|
<arg>--inputPath</arg><arg>${workingDir}/xml_json</arg>
|
||||||
<arg>--isLookupUrl</arg><arg>${isLookupUrl}</arg>
|
<arg>--isLookupUrl</arg><arg>${isLookupUrl}</arg>
|
||||||
<arg>--format</arg><arg>${format}</arg>
|
<arg>--shadowFormat</arg><arg>${shadowFormat}</arg>
|
||||||
<arg>--outputPath</arg><arg>${workingDir}/solr_documents</arg>
|
<arg>--outputPath</arg><arg>${workingDir}/solr_documents</arg>
|
||||||
</spark>
|
</spark>
|
||||||
<ok to="End"/>
|
<ok to="End"/>
|
||||||
|
@ -741,7 +737,6 @@
|
||||||
</configuration>
|
</configuration>
|
||||||
<main-class>eu.dnetlib.dhp.oa.provision.SolrAdminApplication</main-class>
|
<main-class>eu.dnetlib.dhp.oa.provision.SolrAdminApplication</main-class>
|
||||||
<arg>--isLookupUrl</arg><arg>${isLookupUrl}</arg>
|
<arg>--isLookupUrl</arg><arg>${isLookupUrl}</arg>
|
||||||
<arg>--format</arg><arg>${format}</arg>
|
|
||||||
<arg>--action</arg><arg>UPDATE_ALIASES</arg>
|
<arg>--action</arg><arg>UPDATE_ALIASES</arg>
|
||||||
<arg>--publicFormat</arg><arg>${publicFormat}</arg>
|
<arg>--publicFormat</arg><arg>${publicFormat}</arg>
|
||||||
<arg>--shadowFormat</arg><arg>${shadowFormat}</arg>
|
<arg>--shadowFormat</arg><arg>${shadowFormat}</arg>
|
||||||
|
|
|
@ -4,6 +4,7 @@ package eu.dnetlib.dhp.oa.provision;
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
|
|
||||||
|
import org.apache.solr.client.solrj.request.SolrPing;
|
||||||
import org.apache.solr.client.solrj.response.CollectionAdminResponse;
|
import org.apache.solr.client.solrj.response.CollectionAdminResponse;
|
||||||
import org.apache.solr.client.solrj.response.SolrPingResponse;
|
import org.apache.solr.client.solrj.response.SolrPingResponse;
|
||||||
import org.apache.solr.client.solrj.response.UpdateResponse;
|
import org.apache.solr.client.solrj.response.UpdateResponse;
|
||||||
|
@ -13,7 +14,10 @@ class SolrAdminApplicationTest extends SolrTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testPing() throws Exception {
|
void testPing() throws Exception {
|
||||||
SolrPingResponse pingResponse = miniCluster.getSolrClient().ping();
|
final SolrPing ping = new SolrPing();
|
||||||
|
ping.getParams().set("collection", ProvisionConstants.SHADOW_ALIAS_NAME);
|
||||||
|
SolrPingResponse pingResponse = ping.process(miniCluster.getSolrClient());
|
||||||
|
|
||||||
log.info("pingResponse: '{}'", pingResponse.getStatus());
|
log.info("pingResponse: '{}'", pingResponse.getStatus());
|
||||||
assertEquals(0, pingResponse.getStatus());
|
assertEquals(0, pingResponse.getStatus());
|
||||||
}
|
}
|
||||||
|
@ -24,7 +28,7 @@ class SolrAdminApplicationTest extends SolrTest {
|
||||||
SolrAdminApplication admin = new SolrAdminApplication(miniCluster.getSolrClient().getZkHost());
|
SolrAdminApplication admin = new SolrAdminApplication(miniCluster.getSolrClient().getZkHost());
|
||||||
|
|
||||||
UpdateResponse rsp = (UpdateResponse) admin
|
UpdateResponse rsp = (UpdateResponse) admin
|
||||||
.execute(SolrAdminApplication.Action.DELETE_BY_QUERY, DEFAULT_COLLECTION, "*:*", false, null, null);
|
.execute(SolrAdminApplication.Action.DELETE_BY_QUERY, "*:*", false, null, SHADOW_COLLECTION);
|
||||||
|
|
||||||
assertEquals(0, rsp.getStatus());
|
assertEquals(0, rsp.getStatus());
|
||||||
}
|
}
|
||||||
|
@ -34,7 +38,7 @@ class SolrAdminApplicationTest extends SolrTest {
|
||||||
|
|
||||||
SolrAdminApplication admin = new SolrAdminApplication(miniCluster.getSolrClient().getZkHost());
|
SolrAdminApplication admin = new SolrAdminApplication(miniCluster.getSolrClient().getZkHost());
|
||||||
|
|
||||||
UpdateResponse rsp = (UpdateResponse) admin.commit(DEFAULT_COLLECTION);
|
UpdateResponse rsp = (UpdateResponse) admin.commit(SHADOW_COLLECTION);
|
||||||
|
|
||||||
assertEquals(0, rsp.getStatus());
|
assertEquals(0, rsp.getStatus());
|
||||||
}
|
}
|
||||||
|
@ -45,7 +49,7 @@ class SolrAdminApplicationTest extends SolrTest {
|
||||||
SolrAdminApplication admin = new SolrAdminApplication(miniCluster.getSolrClient().getZkHost());
|
SolrAdminApplication admin = new SolrAdminApplication(miniCluster.getSolrClient().getZkHost());
|
||||||
|
|
||||||
CollectionAdminResponse rsp = (CollectionAdminResponse) admin
|
CollectionAdminResponse rsp = (CollectionAdminResponse) admin
|
||||||
.createAlias(ProvisionConstants.PUBLIC_ALIAS_NAME, DEFAULT_COLLECTION);
|
.createAlias(ProvisionConstants.PUBLIC_ALIAS_NAME, SHADOW_COLLECTION);
|
||||||
assertEquals(0, rsp.getStatus());
|
assertEquals(0, rsp.getStatus());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,29 +1,59 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.oa.provision;
|
package eu.dnetlib.dhp.oa.provision;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
|
||||||
|
import eu.dnetlib.dhp.oa.provision.model.SerializableSolrInputDocument;
|
||||||
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.solr.client.solrj.SolrQuery;
|
import org.apache.solr.client.solrj.SolrQuery;
|
||||||
|
import org.apache.solr.client.solrj.embedded.JettyConfig;
|
||||||
|
import org.apache.solr.client.solrj.impl.CloudSolrClient;
|
||||||
|
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
|
||||||
|
import org.apache.solr.client.solrj.request.ConfigSetAdminRequest;
|
||||||
|
import org.apache.solr.client.solrj.request.QueryRequest;
|
||||||
|
import org.apache.solr.client.solrj.response.CollectionAdminResponse;
|
||||||
import org.apache.solr.client.solrj.response.QueryResponse;
|
import org.apache.solr.client.solrj.response.QueryResponse;
|
||||||
|
import org.apache.solr.cloud.MiniSolrCloudCluster;
|
||||||
import org.apache.solr.common.SolrDocument;
|
import org.apache.solr.common.SolrDocument;
|
||||||
|
import org.apache.solr.common.params.CollectionParams;
|
||||||
import org.apache.solr.common.params.CommonParams;
|
import org.apache.solr.common.params.CommonParams;
|
||||||
|
import org.apache.solr.common.params.CoreAdminParams;
|
||||||
|
import org.apache.solr.common.params.ModifiableSolrParams;
|
||||||
|
import org.apache.solr.common.util.NamedList;
|
||||||
import org.apache.spark.SparkConf;
|
import org.apache.spark.SparkConf;
|
||||||
import org.apache.spark.sql.SparkSession;
|
import org.apache.spark.sql.SparkSession;
|
||||||
import org.junit.jupiter.api.*;
|
import org.junit.jupiter.api.*;
|
||||||
import org.junit.jupiter.api.extension.ExtendWith;
|
import org.junit.jupiter.api.extension.ExtendWith;
|
||||||
|
import org.junit.jupiter.api.io.TempDir;
|
||||||
import org.mockito.Mock;
|
import org.mockito.Mock;
|
||||||
import org.mockito.Mockito;
|
import org.mockito.Mockito;
|
||||||
import org.mockito.junit.jupiter.MockitoExtension;
|
import org.mockito.junit.jupiter.MockitoExtension;
|
||||||
|
|
||||||
import eu.dnetlib.dhp.oa.provision.model.SerializableSolrInputDocument;
|
|
||||||
import eu.dnetlib.dhp.oa.provision.utils.ISLookupClient;
|
import eu.dnetlib.dhp.oa.provision.utils.ISLookupClient;
|
||||||
import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpException;
|
import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpException;
|
||||||
import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService;
|
import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
@ExtendWith(MockitoExtension.class)
|
@ExtendWith(MockitoExtension.class)
|
||||||
public class SolrConfigExploreTest extends SolrExploreTest {
|
public class SolrConfigExploreTest {
|
||||||
|
|
||||||
|
protected static final Logger log = LoggerFactory.getLogger(SolrConfigExploreTest.class);
|
||||||
|
|
||||||
|
protected static final String SHADOW_FORMAT = "c1";
|
||||||
|
protected static final String SHADOW_COLLECTION = SHADOW_FORMAT + "-index-openaire";
|
||||||
|
protected static final String PUBLIC_FORMAT = "c2";
|
||||||
|
protected static final String PUBLIC_COLLECTION = PUBLIC_FORMAT + "-index-openaire";
|
||||||
|
|
||||||
|
protected static final String CONFIG_NAME = "testConfig";
|
||||||
|
|
||||||
|
protected static SolrAdminApplication admin;
|
||||||
|
|
||||||
protected static SparkSession spark;
|
protected static SparkSession spark;
|
||||||
|
|
||||||
|
@ -35,15 +65,17 @@ public class SolrConfigExploreTest extends SolrExploreTest {
|
||||||
@Mock
|
@Mock
|
||||||
private ISLookupClient isLookupClient;
|
private ISLookupClient isLookupClient;
|
||||||
|
|
||||||
|
@TempDir
|
||||||
|
public static Path workingDir;
|
||||||
|
|
||||||
|
protected static MiniSolrCloudCluster miniCluster;
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void prepareMocks() throws ISLookUpException, IOException {
|
public void prepareMocks() throws ISLookUpException, IOException {
|
||||||
isLookupClient.setIsLookup(isLookUpService);
|
isLookupClient.setIsLookup(isLookUpService);
|
||||||
|
|
||||||
int solrPort = URI.create("http://" + miniCluster.getZkClient().getZkServerAddress()).getPort();
|
int solrPort = URI.create("http://" + miniCluster.getZkClient().getZkServerAddress()).getPort();
|
||||||
|
|
||||||
Mockito
|
|
||||||
.when(isLookupClient.getDsId(Mockito.anyString()))
|
|
||||||
.thenReturn("313f0381-23b6-466f-a0b8-c72a9679ac4b_SW5kZXhEU1Jlc291cmNlcy9JbmRleERTUmVzb3VyY2VUeXBl");
|
|
||||||
Mockito.when(isLookupClient.getZkHost()).thenReturn(String.format("127.0.0.1:%s/solr", solrPort));
|
Mockito.when(isLookupClient.getZkHost()).thenReturn(String.format("127.0.0.1:%s/solr", solrPort));
|
||||||
Mockito
|
Mockito
|
||||||
.when(isLookupClient.getLayoutSource(Mockito.anyString()))
|
.when(isLookupClient.getLayoutSource(Mockito.anyString()))
|
||||||
|
@ -54,12 +86,12 @@ public class SolrConfigExploreTest extends SolrExploreTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@BeforeAll
|
@BeforeAll
|
||||||
public static void before() {
|
public static void setup() throws Exception {
|
||||||
|
|
||||||
SparkConf conf = new SparkConf();
|
SparkConf conf = new SparkConf();
|
||||||
conf.setAppName(XmlIndexingJobTest.class.getSimpleName());
|
conf.setAppName(XmlIndexingJobTest.class.getSimpleName());
|
||||||
conf.registerKryoClasses(new Class[] {
|
conf.registerKryoClasses(new Class[] {
|
||||||
SerializableSolrInputDocument.class
|
SerializableSolrInputDocument.class
|
||||||
});
|
});
|
||||||
|
|
||||||
conf.setMaster("local[1]");
|
conf.setMaster("local[1]");
|
||||||
|
@ -69,16 +101,76 @@ public class SolrConfigExploreTest extends SolrExploreTest {
|
||||||
conf.set("spark.sql.warehouse.dir", workingDir.resolve("spark").toString());
|
conf.set("spark.sql.warehouse.dir", workingDir.resolve("spark").toString());
|
||||||
|
|
||||||
spark = SparkSession
|
spark = SparkSession
|
||||||
.builder()
|
.builder()
|
||||||
.appName(XmlIndexingJobTest.class.getSimpleName())
|
.appName(SolrConfigExploreTest.class.getSimpleName())
|
||||||
.config(conf)
|
.config(conf)
|
||||||
.getOrCreate();
|
.getOrCreate();
|
||||||
|
|
||||||
|
// random unassigned HTTP port
|
||||||
|
final int jettyPort = 0;
|
||||||
|
final JettyConfig jettyConfig = JettyConfig.builder().setPort(jettyPort).build();
|
||||||
|
|
||||||
|
log.info(String.format("working directory: %s", workingDir.toString()));
|
||||||
|
System.setProperty("solr.log.dir", workingDir.resolve("logs").toString());
|
||||||
|
|
||||||
|
// create a MiniSolrCloudCluster instance
|
||||||
|
miniCluster = new MiniSolrCloudCluster(2, workingDir.resolve("solr"), jettyConfig);
|
||||||
|
|
||||||
|
// Upload Solr configuration directory to ZooKeeper
|
||||||
|
String solrZKConfigDir = "src/test/resources/eu/dnetlib/dhp/oa/provision/solr/conf/exploreTestConfig";
|
||||||
|
File configDir = new File(solrZKConfigDir);
|
||||||
|
|
||||||
|
miniCluster.uploadConfigSet(configDir.toPath(), CONFIG_NAME);
|
||||||
|
|
||||||
|
// override settings in the solrconfig include
|
||||||
|
System.setProperty("solr.tests.maxBufferedDocs", "100000");
|
||||||
|
System.setProperty("solr.tests.maxIndexingThreads", "-1");
|
||||||
|
System.setProperty("solr.tests.ramBufferSizeMB", "100");
|
||||||
|
|
||||||
|
// use non-test classes so RandomizedRunner isn't necessary
|
||||||
|
System.setProperty("solr.tests.mergeScheduler", "org.apache.lucene.index.ConcurrentMergeScheduler");
|
||||||
|
System.setProperty("solr.directoryFactory", "solr.RAMDirectoryFactory");
|
||||||
|
System.setProperty("solr.lock.type", "single");
|
||||||
|
|
||||||
|
log.info(new ConfigSetAdminRequest.List().process(miniCluster.getSolrClient()).toString());
|
||||||
|
log
|
||||||
|
.info(
|
||||||
|
CollectionAdminRequest.ClusterStatus
|
||||||
|
.getClusterStatus()
|
||||||
|
.process(miniCluster.getSolrClient())
|
||||||
|
.toString());
|
||||||
|
|
||||||
|
NamedList<Object> res = createCollection(
|
||||||
|
miniCluster.getSolrClient(), SHADOW_COLLECTION, 4, 2, 20, CONFIG_NAME);
|
||||||
|
res.forEach(o -> log.info(o.toString()));
|
||||||
|
|
||||||
|
// miniCluster.getSolrClient().setDefaultCollection(SHADOW_COLLECTION);
|
||||||
|
|
||||||
|
res = createCollection(
|
||||||
|
miniCluster.getSolrClient(), PUBLIC_COLLECTION, 4, 2, 20, CONFIG_NAME);
|
||||||
|
res.forEach(o -> log.info(o.toString()));
|
||||||
|
|
||||||
|
admin = new SolrAdminApplication(miniCluster.getZkClient().getZkServerAddress());
|
||||||
|
CollectionAdminResponse rsp = (CollectionAdminResponse) admin
|
||||||
|
.createAlias(ProvisionConstants.PUBLIC_ALIAS_NAME, PUBLIC_COLLECTION);
|
||||||
|
assertEquals(0, rsp.getStatus());
|
||||||
|
rsp = (CollectionAdminResponse) admin.createAlias(ProvisionConstants.SHADOW_ALIAS_NAME, SHADOW_COLLECTION);
|
||||||
|
assertEquals(0, rsp.getStatus());
|
||||||
|
|
||||||
|
log
|
||||||
|
.info(
|
||||||
|
CollectionAdminRequest.ClusterStatus
|
||||||
|
.getClusterStatus()
|
||||||
|
.process(miniCluster.getSolrClient())
|
||||||
|
.toString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterAll
|
@AfterAll
|
||||||
public static void tearDown() {
|
public static void tearDown() throws Exception {
|
||||||
spark.stop();
|
spark.stop();
|
||||||
|
miniCluster.shutdown();
|
||||||
|
FileUtils.deleteDirectory(workingDir.toFile());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -86,8 +178,9 @@ 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).run(isLookupClient);
|
new XmlIndexingJob(spark, inputPath, SHADOW_FORMAT, ProvisionConstants.SHADOW_ALIAS_NAME, batchSize)
|
||||||
Assertions.assertEquals(0, miniCluster.getSolrClient().commit().getStatus());
|
.run(isLookupClient);
|
||||||
|
Assertions.assertEquals(0, miniCluster.getSolrClient().commit(ProvisionConstants.SHADOW_ALIAS_NAME).getStatus());
|
||||||
|
|
||||||
String[] queryStrings = {
|
String[] queryStrings = {
|
||||||
"cancer",
|
"cancer",
|
||||||
|
@ -101,14 +194,13 @@ public class SolrConfigExploreTest extends SolrExploreTest {
|
||||||
query.add(CommonParams.Q, q);
|
query.add(CommonParams.Q, q);
|
||||||
query.set("debugQuery", "on");
|
query.set("debugQuery", "on");
|
||||||
|
|
||||||
log.info("Submit query to Solr with params: {}", query.toString());
|
log.info("Submit query to Solr with params: {}", query);
|
||||||
QueryResponse rsp = miniCluster.getSolrClient().query(query);
|
QueryResponse rsp = miniCluster.getSolrClient().query(ProvisionConstants.SHADOW_ALIAS_NAME, query);
|
||||||
// System.out.println(rsp.getHighlighting());
|
// System.out.println(rsp.getHighlighting());
|
||||||
// System.out.println(rsp.getExplainMap());
|
// System.out.println(rsp.getExplainMap());
|
||||||
|
|
||||||
for (SolrDocument doc : rsp.getResults()) {
|
for (SolrDocument doc : rsp.getResults()) {
|
||||||
System.out
|
log.info(
|
||||||
.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" +
|
||||||
|
@ -122,4 +214,18 @@ public class SolrConfigExploreTest extends SolrExploreTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected static NamedList<Object> createCollection(CloudSolrClient client, String name, int numShards,
|
||||||
|
int replicationFactor, int maxShardsPerNode, String configName) throws Exception {
|
||||||
|
ModifiableSolrParams modParams = new ModifiableSolrParams();
|
||||||
|
modParams.set(CoreAdminParams.ACTION, CollectionParams.CollectionAction.CREATE.name());
|
||||||
|
modParams.set("name", name);
|
||||||
|
modParams.set("numShards", numShards);
|
||||||
|
modParams.set("replicationFactor", replicationFactor);
|
||||||
|
modParams.set("collection.configName", configName);
|
||||||
|
modParams.set("maxShardsPerNode", maxShardsPerNode);
|
||||||
|
QueryRequest request = new QueryRequest(modParams);
|
||||||
|
request.setPath("/admin/collections");
|
||||||
|
return client.request(request);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,24 +2,15 @@
|
||||||
package eu.dnetlib.dhp.oa.provision;
|
package eu.dnetlib.dhp.oa.provision;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.StringReader;
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.hadoop.io.Text;
|
|
||||||
import org.apache.solr.client.solrj.SolrQuery;
|
import org.apache.solr.client.solrj.SolrQuery;
|
||||||
import org.apache.solr.client.solrj.response.QueryResponse;
|
import org.apache.solr.client.solrj.response.QueryResponse;
|
||||||
import org.apache.solr.common.SolrDocument;
|
import org.apache.solr.common.SolrDocument;
|
||||||
import org.apache.solr.common.SolrInputField;
|
|
||||||
import org.apache.solr.common.params.CommonParams;
|
import org.apache.solr.common.params.CommonParams;
|
||||||
import org.apache.spark.SparkConf;
|
import org.apache.spark.SparkConf;
|
||||||
import org.apache.spark.api.java.JavaPairRDD;
|
|
||||||
import org.apache.spark.api.java.JavaSparkContext;
|
|
||||||
import org.apache.spark.api.java.function.MapFunction;
|
|
||||||
import org.apache.spark.sql.Dataset;
|
|
||||||
import org.apache.spark.sql.Encoders;
|
|
||||||
import org.apache.spark.sql.SparkSession;
|
import org.apache.spark.sql.SparkSession;
|
||||||
import org.dom4j.io.SAXReader;
|
|
||||||
import org.junit.jupiter.api.*;
|
import org.junit.jupiter.api.*;
|
||||||
import org.junit.jupiter.api.extension.ExtendWith;
|
import org.junit.jupiter.api.extension.ExtendWith;
|
||||||
import org.mockito.Mock;
|
import org.mockito.Mock;
|
||||||
|
@ -50,9 +41,6 @@ public class SolrConfigTest extends SolrTest {
|
||||||
|
|
||||||
int solrPort = URI.create("http://" + miniCluster.getZkClient().getZkServerAddress()).getPort();
|
int solrPort = URI.create("http://" + miniCluster.getZkClient().getZkServerAddress()).getPort();
|
||||||
|
|
||||||
Mockito
|
|
||||||
.when(isLookupClient.getDsId(Mockito.anyString()))
|
|
||||||
.thenReturn("313f0381-23b6-466f-a0b8-c72a9679ac4b_SW5kZXhEU1Jlc291cmNlcy9JbmRleERTUmVzb3VyY2VUeXBl");
|
|
||||||
Mockito.when(isLookupClient.getZkHost()).thenReturn(String.format("127.0.0.1:%s/solr", solrPort));
|
Mockito.when(isLookupClient.getZkHost()).thenReturn(String.format("127.0.0.1:%s/solr", solrPort));
|
||||||
Mockito
|
Mockito
|
||||||
.when(isLookupClient.getLayoutSource(Mockito.anyString()))
|
.when(isLookupClient.getLayoutSource(Mockito.anyString()))
|
||||||
|
@ -95,9 +83,9 @@ 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)
|
new XmlIndexingJob(spark, inputPath, SHADOW_FORMAT, ProvisionConstants.SHADOW_ALIAS_NAME, batchSize)
|
||||||
.run(isLookupClient);
|
.run(isLookupClient);
|
||||||
Assertions.assertEquals(0, miniCluster.getSolrClient().commit().getStatus());
|
Assertions.assertEquals(0, miniCluster.getSolrClient().commit(ProvisionConstants.SHADOW_ALIAS_NAME).getStatus());
|
||||||
|
|
||||||
String[] queryStrings = {
|
String[] queryStrings = {
|
||||||
"cancer",
|
"cancer",
|
||||||
|
@ -109,8 +97,8 @@ public class SolrConfigTest extends SolrTest {
|
||||||
SolrQuery query = new SolrQuery();
|
SolrQuery query = new SolrQuery();
|
||||||
query.add(CommonParams.Q, q);
|
query.add(CommonParams.Q, q);
|
||||||
|
|
||||||
log.info("Submit query to Solr with params: {}", query.toString());
|
log.info("Submit query to Solr with params: {}", query);
|
||||||
QueryResponse rsp = miniCluster.getSolrClient().query(query);
|
QueryResponse rsp = miniCluster.getSolrClient().query(ProvisionConstants.SHADOW_ALIAS_NAME, query);
|
||||||
|
|
||||||
for (SolrDocument doc : rsp.getResults()) {
|
for (SolrDocument doc : rsp.getResults()) {
|
||||||
System.out
|
System.out
|
||||||
|
|
|
@ -34,58 +34,6 @@ public abstract class SolrExploreTest {
|
||||||
@TempDir
|
@TempDir
|
||||||
public static Path workingDir;
|
public static Path workingDir;
|
||||||
|
|
||||||
@BeforeAll
|
|
||||||
public static void setup() throws Exception {
|
|
||||||
|
|
||||||
// random unassigned HTTP port
|
|
||||||
final int jettyPort = 0;
|
|
||||||
final JettyConfig jettyConfig = JettyConfig.builder().setPort(jettyPort).build();
|
|
||||||
|
|
||||||
log.info(String.format("working directory: %s", workingDir.toString()));
|
|
||||||
System.setProperty("solr.log.dir", workingDir.resolve("logs").toString());
|
|
||||||
|
|
||||||
// create a MiniSolrCloudCluster instance
|
|
||||||
miniCluster = new MiniSolrCloudCluster(2, workingDir.resolve("solr"), jettyConfig);
|
|
||||||
|
|
||||||
// Upload Solr configuration directory to ZooKeeper
|
|
||||||
String solrZKConfigDir = "src/test/resources/eu/dnetlib/dhp/oa/provision/solr/conf/exploreTestConfig";
|
|
||||||
File configDir = new File(solrZKConfigDir);
|
|
||||||
|
|
||||||
miniCluster.uploadConfigSet(configDir.toPath(), CONFIG_NAME);
|
|
||||||
|
|
||||||
// override settings in the solrconfig include
|
|
||||||
System.setProperty("solr.tests.maxBufferedDocs", "100000");
|
|
||||||
System.setProperty("solr.tests.maxIndexingThreads", "-1");
|
|
||||||
System.setProperty("solr.tests.ramBufferSizeMB", "100");
|
|
||||||
|
|
||||||
// use non-test classes so RandomizedRunner isn't necessary
|
|
||||||
System.setProperty("solr.tests.mergeScheduler", "org.apache.lucene.index.ConcurrentMergeScheduler");
|
|
||||||
System.setProperty("solr.directoryFactory", "solr.RAMDirectoryFactory");
|
|
||||||
System.setProperty("solr.lock.type", "single");
|
|
||||||
|
|
||||||
log.info(new ConfigSetAdminRequest.List().process(miniCluster.getSolrClient()).toString());
|
|
||||||
log
|
|
||||||
.info(
|
|
||||||
CollectionAdminRequest.ClusterStatus
|
|
||||||
.getClusterStatus()
|
|
||||||
.process(miniCluster.getSolrClient())
|
|
||||||
.toString());
|
|
||||||
|
|
||||||
NamedList<Object> res = createCollection(
|
|
||||||
miniCluster.getSolrClient(), DEFAULT_COLLECTION, 4, 2, 20, CONFIG_NAME);
|
|
||||||
res.forEach(o -> log.info(o.toString()));
|
|
||||||
|
|
||||||
miniCluster.getSolrClient().setDefaultCollection(DEFAULT_COLLECTION);
|
|
||||||
|
|
||||||
log
|
|
||||||
.info(
|
|
||||||
CollectionAdminRequest.ClusterStatus
|
|
||||||
.getClusterStatus()
|
|
||||||
.process(miniCluster.getSolrClient())
|
|
||||||
.toString());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@AfterAll
|
@AfterAll
|
||||||
public static void shutDown() throws Exception {
|
public static void shutDown() throws Exception {
|
||||||
miniCluster.shutdown();
|
miniCluster.shutdown();
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.oa.provision;
|
package eu.dnetlib.dhp.oa.provision;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
|
||||||
|
@ -10,6 +12,7 @@ import org.apache.solr.client.solrj.impl.CloudSolrClient;
|
||||||
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
|
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
|
||||||
import org.apache.solr.client.solrj.request.ConfigSetAdminRequest;
|
import org.apache.solr.client.solrj.request.ConfigSetAdminRequest;
|
||||||
import org.apache.solr.client.solrj.request.QueryRequest;
|
import org.apache.solr.client.solrj.request.QueryRequest;
|
||||||
|
import org.apache.solr.client.solrj.response.CollectionAdminResponse;
|
||||||
import org.apache.solr.cloud.MiniSolrCloudCluster;
|
import org.apache.solr.cloud.MiniSolrCloudCluster;
|
||||||
import org.apache.solr.common.params.CollectionParams;
|
import org.apache.solr.common.params.CollectionParams;
|
||||||
import org.apache.solr.common.params.CoreAdminParams;
|
import org.apache.solr.common.params.CoreAdminParams;
|
||||||
|
@ -21,14 +24,21 @@ import org.junit.jupiter.api.io.TempDir;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import sun.security.provider.SHA;
|
||||||
|
|
||||||
public abstract class SolrTest {
|
public abstract class SolrTest {
|
||||||
|
|
||||||
protected static final Logger log = LoggerFactory.getLogger(SolrTest.class);
|
protected static final Logger log = LoggerFactory.getLogger(SolrTest.class);
|
||||||
|
|
||||||
protected static final String FORMAT = "test";
|
protected static final String SHADOW_FORMAT = "c1";
|
||||||
protected static final String DEFAULT_COLLECTION = FORMAT + "-index-openaire";
|
protected static final String SHADOW_COLLECTION = SHADOW_FORMAT + "-index-openaire";
|
||||||
|
protected static final String PUBLIC_FORMAT = "c2";
|
||||||
|
protected static final String PUBLIC_COLLECTION = PUBLIC_FORMAT + "-index-openaire";
|
||||||
|
|
||||||
protected static final String CONFIG_NAME = "testConfig";
|
protected static final String CONFIG_NAME = "testConfig";
|
||||||
|
|
||||||
|
protected static SolrAdminApplication admin;
|
||||||
|
|
||||||
protected static MiniSolrCloudCluster miniCluster;
|
protected static MiniSolrCloudCluster miniCluster;
|
||||||
|
|
||||||
@TempDir
|
@TempDir
|
||||||
|
@ -72,10 +82,21 @@ public abstract class SolrTest {
|
||||||
.toString());
|
.toString());
|
||||||
|
|
||||||
NamedList<Object> res = createCollection(
|
NamedList<Object> res = createCollection(
|
||||||
miniCluster.getSolrClient(), DEFAULT_COLLECTION, 4, 2, 20, CONFIG_NAME);
|
miniCluster.getSolrClient(), SHADOW_COLLECTION, 4, 2, 20, CONFIG_NAME);
|
||||||
res.forEach(o -> log.info(o.toString()));
|
res.forEach(o -> log.info(o.toString()));
|
||||||
|
|
||||||
miniCluster.getSolrClient().setDefaultCollection(DEFAULT_COLLECTION);
|
// miniCluster.getSolrClient().setDefaultCollection(SHADOW_COLLECTION);
|
||||||
|
|
||||||
|
res = createCollection(
|
||||||
|
miniCluster.getSolrClient(), PUBLIC_COLLECTION, 4, 2, 20, CONFIG_NAME);
|
||||||
|
res.forEach(o -> log.info(o.toString()));
|
||||||
|
|
||||||
|
admin = new SolrAdminApplication(miniCluster.getZkClient().getZkServerAddress());
|
||||||
|
CollectionAdminResponse rsp = (CollectionAdminResponse) admin
|
||||||
|
.createAlias(ProvisionConstants.PUBLIC_ALIAS_NAME, PUBLIC_COLLECTION);
|
||||||
|
assertEquals(0, rsp.getStatus());
|
||||||
|
rsp = (CollectionAdminResponse) admin.createAlias(ProvisionConstants.SHADOW_ALIAS_NAME, SHADOW_COLLECTION);
|
||||||
|
assertEquals(0, rsp.getStatus());
|
||||||
|
|
||||||
log
|
log
|
||||||
.info(
|
.info(
|
||||||
|
@ -83,12 +104,12 @@ public abstract class SolrTest {
|
||||||
.getClusterStatus()
|
.getClusterStatus()
|
||||||
.process(miniCluster.getSolrClient())
|
.process(miniCluster.getSolrClient())
|
||||||
.toString());
|
.toString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterAll
|
@AfterAll
|
||||||
public static void shutDown() throws Exception {
|
public static void shutDown() throws Exception {
|
||||||
miniCluster.shutdown();
|
miniCluster.shutdown();
|
||||||
|
admin.close();
|
||||||
FileUtils.deleteDirectory(workingDir.toFile());
|
FileUtils.deleteDirectory(workingDir.toFile());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ import java.util.Optional;
|
||||||
|
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.solr.client.solrj.SolrQuery;
|
import org.apache.solr.client.solrj.SolrQuery;
|
||||||
|
import org.apache.solr.client.solrj.SolrResponse;
|
||||||
import org.apache.solr.client.solrj.response.QueryResponse;
|
import org.apache.solr.client.solrj.response.QueryResponse;
|
||||||
import org.apache.solr.common.params.CommonParams;
|
import org.apache.solr.common.params.CommonParams;
|
||||||
import org.apache.spark.SparkConf;
|
import org.apache.spark.SparkConf;
|
||||||
|
@ -50,9 +51,6 @@ public class XmlIndexingJobTest extends SolrTest {
|
||||||
|
|
||||||
int solrPort = URI.create("http://" + miniCluster.getZkClient().getZkServerAddress()).getPort();
|
int solrPort = URI.create("http://" + miniCluster.getZkClient().getZkServerAddress()).getPort();
|
||||||
|
|
||||||
Mockito
|
|
||||||
.when(isLookupClient.getDsId(Mockito.anyString()))
|
|
||||||
.thenReturn("313f0381-23b6-466f-a0b8-c72a9679ac4b_SW5kZXhEU1Jlc291cmNlcy9JbmRleERTUmVzb3VyY2VUeXBl");
|
|
||||||
Mockito.when(isLookupClient.getZkHost()).thenReturn(String.format("127.0.0.1:%s/solr", solrPort));
|
Mockito.when(isLookupClient.getZkHost()).thenReturn(String.format("127.0.0.1:%s/solr", solrPort));
|
||||||
Mockito
|
Mockito
|
||||||
.when(isLookupClient.getLayoutSource(Mockito.anyString()))
|
.when(isLookupClient.getLayoutSource(Mockito.anyString()))
|
||||||
|
@ -103,46 +101,72 @@ public class XmlIndexingJobTest extends SolrTest {
|
||||||
|
|
||||||
long nRecord = records.count();
|
long nRecord = records.count();
|
||||||
|
|
||||||
new XmlIndexingJob(spark, inputPath, FORMAT, batchSize).run(isLookupClient);
|
new XmlIndexingJob(spark, inputPath, SHADOW_FORMAT, ProvisionConstants.SHADOW_ALIAS_NAME, batchSize)
|
||||||
|
.run(isLookupClient);
|
||||||
|
|
||||||
assertEquals(0, miniCluster.getSolrClient().commit().getStatus());
|
assertEquals(0, miniCluster.getSolrClient().commit(SHADOW_COLLECTION).getStatus());
|
||||||
|
|
||||||
QueryResponse rsp = miniCluster.getSolrClient().query(new SolrQuery().add(CommonParams.Q, "*:*"));
|
QueryResponse rsp = miniCluster
|
||||||
|
.getSolrClient()
|
||||||
|
.query(
|
||||||
|
ProvisionConstants.SHADOW_ALIAS_NAME,
|
||||||
|
new SolrQuery().add(CommonParams.Q, "*:*"));
|
||||||
|
|
||||||
assertEquals(
|
assertEquals(
|
||||||
nRecord, rsp.getResults().getNumFound(),
|
nRecord, rsp.getResults().getNumFound(),
|
||||||
"the number of indexed records should be equal to the number of input records");
|
"the number of indexed records should be equal to the number of input records");
|
||||||
|
|
||||||
rsp = miniCluster.getSolrClient().query(new SolrQuery().add(CommonParams.Q, "isgreen:true"));
|
rsp = miniCluster
|
||||||
|
.getSolrClient()
|
||||||
|
.query(
|
||||||
|
ProvisionConstants.SHADOW_ALIAS_NAME,
|
||||||
|
new SolrQuery().add(CommonParams.Q, "isgreen:true"));
|
||||||
assertEquals(
|
assertEquals(
|
||||||
0, rsp.getResults().getNumFound(),
|
4, rsp.getResults().getNumFound(),
|
||||||
"the number of indexed records having isgreen = true");
|
"the number of indexed records having isgreen = true");
|
||||||
|
|
||||||
rsp = miniCluster.getSolrClient().query(new SolrQuery().add(CommonParams.Q, "openaccesscolor:bronze"));
|
rsp = miniCluster
|
||||||
|
.getSolrClient()
|
||||||
|
.query(
|
||||||
|
ProvisionConstants.SHADOW_ALIAS_NAME,
|
||||||
|
new SolrQuery().add(CommonParams.Q, "openaccesscolor:bronze"));
|
||||||
assertEquals(
|
assertEquals(
|
||||||
0, rsp.getResults().getNumFound(),
|
2, rsp.getResults().getNumFound(),
|
||||||
"the number of indexed records having openaccesscolor = bronze");
|
"the number of indexed records having openaccesscolor = bronze");
|
||||||
|
|
||||||
rsp = miniCluster.getSolrClient().query(new SolrQuery().add(CommonParams.Q, "isindiamondjournal:true"));
|
rsp = miniCluster
|
||||||
|
.getSolrClient()
|
||||||
|
.query(
|
||||||
|
ProvisionConstants.SHADOW_ALIAS_NAME,
|
||||||
|
new SolrQuery().add(CommonParams.Q, "isindiamondjournal:true"));
|
||||||
assertEquals(
|
assertEquals(
|
||||||
0, rsp.getResults().getNumFound(),
|
0, rsp.getResults().getNumFound(),
|
||||||
"the number of indexed records having isindiamondjournal = true");
|
"the number of indexed records having isindiamondjournal = true");
|
||||||
|
|
||||||
rsp = miniCluster.getSolrClient().query(new SolrQuery().add(CommonParams.Q, "publiclyfunded:true"));
|
rsp = miniCluster
|
||||||
|
.getSolrClient()
|
||||||
|
.query(
|
||||||
|
ProvisionConstants.SHADOW_ALIAS_NAME,
|
||||||
|
new SolrQuery().add(CommonParams.Q, "publiclyfunded:true"));
|
||||||
assertEquals(
|
assertEquals(
|
||||||
0, rsp.getResults().getNumFound(),
|
0, rsp.getResults().getNumFound(),
|
||||||
"the number of indexed records having publiclyfunded = true");
|
"the number of indexed records having publiclyfunded = true");
|
||||||
|
|
||||||
rsp = miniCluster.getSolrClient().query(new SolrQuery().add(CommonParams.Q, "peerreviewed:true"));
|
rsp = miniCluster
|
||||||
|
.getSolrClient()
|
||||||
|
.query(
|
||||||
|
ProvisionConstants.SHADOW_ALIAS_NAME,
|
||||||
|
new SolrQuery().add(CommonParams.Q, "peerreviewed:true"));
|
||||||
assertEquals(
|
assertEquals(
|
||||||
0, rsp.getResults().getNumFound(),
|
35, rsp.getResults().getNumFound(),
|
||||||
"the number of indexed records having peerreviewed = true");
|
"the number of indexed records having peerreviewed = true");
|
||||||
|
|
||||||
rsp = miniCluster
|
rsp = miniCluster
|
||||||
.getSolrClient()
|
.getSolrClient()
|
||||||
.query(
|
.query(
|
||||||
|
ProvisionConstants.SHADOW_ALIAS_NAME,
|
||||||
new SolrQuery()
|
new SolrQuery()
|
||||||
.add(CommonParams.Q, "objidentifier:\"iddesignpres::ae77e56e84ad058d9e7f19fa2f7325db\"")
|
.add(CommonParams.Q, "objidentifier:\"57a035e5b1ae::236d6d8c1e03368b5ae72acfeeb11bbc\"")
|
||||||
.add(CommonParams.FL, "__json"));
|
.add(CommonParams.FL, "__json"));
|
||||||
assertEquals(
|
assertEquals(
|
||||||
1, rsp.getResults().getNumFound(),
|
1, rsp.getResults().getNumFound(),
|
||||||
|
@ -158,6 +182,22 @@ public class XmlIndexingJobTest extends SolrTest {
|
||||||
|
|
||||||
log.info((String) json.get());
|
log.info((String) json.get());
|
||||||
|
|
||||||
|
admin
|
||||||
|
.execute(
|
||||||
|
SolrAdminApplication.Action.UPDATE_ALIASES, null, false,
|
||||||
|
SHADOW_COLLECTION, PUBLIC_COLLECTION);
|
||||||
|
|
||||||
|
rsp = miniCluster
|
||||||
|
.getSolrClient()
|
||||||
|
.query(
|
||||||
|
ProvisionConstants.PUBLIC_ALIAS_NAME,
|
||||||
|
new SolrQuery()
|
||||||
|
.add(CommonParams.Q, "objidentifier:\"57a035e5b1ae::236d6d8c1e03368b5ae72acfeeb11bbc\"")
|
||||||
|
.add(CommonParams.FL, "__json"));
|
||||||
|
|
||||||
|
assertEquals(
|
||||||
|
1, rsp.getResults().getNumFound(),
|
||||||
|
"the number of indexed records having the given identifier, found in the public collection");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,15 +68,12 @@
|
||||||
<FIELD copy="true" indexable="false" name="externalreflabel" result="false" stat="false" tokenizable="true" xpath="distinct-values(//*[local-name()='entity']/*//children/externalreference/label)"/>
|
<FIELD copy="true" indexable="false" name="externalreflabel" result="false" stat="false" tokenizable="true" xpath="distinct-values(//*[local-name()='entity']/*//children/externalreference/label)"/>
|
||||||
<FIELD copy="true" indexable="true" name="resultidentifier" result="false" stat="false" type="string_ci" xpath="distinct-values(//*[local-name()='entity']/*[local-name()='result']/children/instance/webresource/*[local-name()='url'])"/>
|
<FIELD copy="true" indexable="true" name="resultidentifier" result="false" stat="false" type="string_ci" xpath="distinct-values(//*[local-name()='entity']/*[local-name()='result']/children/instance/webresource/*[local-name()='url'])"/>
|
||||||
<FIELD copy="true" indexable="false" name="resultsource" result="false" stat="false" xpath="distinct-values(//*[local-name()='entity']/*[local-name()='result']/source)"/>
|
<FIELD copy="true" indexable="false" name="resultsource" result="false" stat="false" xpath="distinct-values(//*[local-name()='entity']/*[local-name()='result']/source)"/>
|
||||||
|
|
||||||
<FIELD indexable="true" multivalued="false" name="isgreen" result="false" stat="false" type="boolean" value="//*[local-name()='entity']/*[local-name()='result']/isgreen"/>
|
<FIELD indexable="true" multivalued="false" name="isgreen" result="false" stat="false" type="boolean" value="//*[local-name()='entity']/*[local-name()='result']/isgreen"/>
|
||||||
<FIELD indexable="true" multivalued="false" name="openaccesscolor" result="false" stat="false" tokenizable="false" value="//*[local-name()='entity']/*[local-name()='result']/openaccesscolor"/>
|
<FIELD indexable="true" multivalued="false" name="openaccesscolor" result="false" stat="false" tokenizable="false" value="//*[local-name()='entity']/*[local-name()='result']/openaccesscolor"/>
|
||||||
<FIELD indexable="true" multivalued="false" name="isindiamondjournal" result="false" stat="false" type="boolean" value="//*[local-name()='entity']/*[local-name()='result']/isindiamondjournal"/>
|
<FIELD indexable="true" multivalued="false" name="isindiamondjournal" result="false" stat="false" type="boolean" value="//*[local-name()='entity']/*[local-name()='result']/isindiamondjournal"/>
|
||||||
<FIELD indexable="true" multivalued="false" name="publiclyfunded" result="false" stat="false" type="boolean" value="//*[local-name()='entity']/*[local-name()='result']/publiclyfunded"/>
|
<FIELD indexable="true" multivalued="false" name="publiclyfunded" result="false" stat="false" type="boolean" value="//*[local-name()='entity']/*[local-name()='result']/publiclyfunded"/>
|
||||||
|
|
||||||
<FIELD indexable="true" multivalued="false" name="peerreviewed" result="false" stat="false" type="boolean" value="some $refereed in //*[local-name()='entity']/*[local-name()='result']/children/instance/*[local-name()='refereed']/@classid satisfies ($refereed = '0001')"/>
|
<FIELD indexable="true" multivalued="false" name="peerreviewed" result="false" stat="false" type="boolean" value="some $refereed in //*[local-name()='entity']/*[local-name()='result']/children/instance/*[local-name()='refereed']/@classid satisfies ($refereed = '0001')"/>
|
||||||
|
<FIELD indexable="true" multivalued="false" name="haslicense" result="false" stat="false" type="boolean" value="some $license in //*[local-name()='entity']/*[local-name()='result']/children/instance/*[local-name()='license']/text() satisfies (string-length($license) > 0)"/>
|
||||||
|
|
||||||
<FIELD indexable="true" name="eoscifguidelines" result="false" stat="false" tokenizable="false" xpath="distinct-values(//*[local-name() = 'result']/eoscifguidelines/@code)"/><!-- FOS and SDGs non tokenizable for faceted search-->
|
<FIELD indexable="true" name="eoscifguidelines" result="false" stat="false" tokenizable="false" xpath="distinct-values(//*[local-name() = 'result']/eoscifguidelines/@code)"/><!-- FOS and SDGs non tokenizable for faceted search-->
|
||||||
<FIELD indexable="true" name="fos" result="false" stat="false" tokenizable="false" xpath="distinct-values(//*[local-name()='entity']/*[local-name()='result']/subject[@classid='FOS'])"/>
|
<FIELD indexable="true" name="fos" result="false" stat="false" tokenizable="false" xpath="distinct-values(//*[local-name()='entity']/*[local-name()='result']/subject[@classid='FOS'])"/>
|
||||||
<FIELD indexable="true" name="foslabel" result="false" stat="false" tokenizable="false" value="concat(./text(), '||', replace(./text(), '^\d+\s', ''))" xpath="//*[local-name()='entity']/*[local-name()='result']/subject[@classid='FOS']"/>
|
<FIELD indexable="true" name="foslabel" result="false" stat="false" tokenizable="false" value="concat(./text(), '||', replace(./text(), '^\d+\s', ''))" xpath="//*[local-name()='entity']/*[local-name()='result']/subject[@classid='FOS']"/>
|
||||||
|
@ -93,6 +90,7 @@
|
||||||
<FIELD indexable="true" name="relorganizationid" result="false" stat="false" tokenizable="false" xpath="distinct-values(//*[local-name()='entity']/*//rel/to[@type='organization'])"/>
|
<FIELD indexable="true" name="relorganizationid" result="false" stat="false" tokenizable="false" xpath="distinct-values(//*[local-name()='entity']/*//rel/to[@type='organization'])"/>
|
||||||
<FIELD copy="true" indexable="true" name="relorganizationname" result="false" stat="false" xpath="distinct-values(//*[local-name()='entity']/*//rel[./to/@type='organization']/legalname)"/>
|
<FIELD copy="true" indexable="true" name="relorganizationname" result="false" stat="false" xpath="distinct-values(//*[local-name()='entity']/*//rel[./to/@type='organization']/legalname)"/>
|
||||||
<FIELD copy="true" indexable="true" name="relorganizationshortname" result="false" stat="false" xpath="distinct-values(//*[local-name()='entity']/*//rel[./to/@type='organization']/legalshortname)"/>
|
<FIELD copy="true" indexable="true" name="relorganizationshortname" result="false" stat="false" xpath="distinct-values(//*[local-name()='entity']/*//rel[./to/@type='organization']/legalshortname)"/>
|
||||||
|
<FIELD indexable="true" name="relorganization" result="false" stat="false" tokenizable="false" value="distinct-values(concat(./to, '||', ./legalname))" xpath="//*[local-name()='entity']/*//rel[./to/@type='organization']"/>
|
||||||
<FIELD indexable="true" name="relresultid" result="false" stat="false" tokenizable="false" xpath="distinct-values(//*[local-name()='entity']/*//rel/to[@type='publication' or @type='dataset' or @type='software' or @type='otherresearchproduct'])"/>
|
<FIELD indexable="true" name="relresultid" result="false" stat="false" tokenizable="false" xpath="distinct-values(//*[local-name()='entity']/*//rel/to[@type='publication' or @type='dataset' or @type='software' or @type='otherresearchproduct'])"/>
|
||||||
<FIELD indexable="true" name="relresulttype" result="false" stat="false" tokenizable="false" xpath="distinct-values(//*[local-name()='entity']/*//rel/to/@type)"/>
|
<FIELD indexable="true" name="relresulttype" result="false" stat="false" tokenizable="false" xpath="distinct-values(//*[local-name()='entity']/*//rel/to/@type)"/>
|
||||||
<FIELD indexable="true" name="relclass" result="false" stat="false" tokenizable="false" xpath="distinct-values(//*[local-name()='entity']/*//rel/to/@class)"/>
|
<FIELD indexable="true" name="relclass" result="false" stat="false" tokenizable="false" xpath="distinct-values(//*[local-name()='entity']/*//rel/to/@class)"/>
|
||||||
|
@ -122,6 +120,7 @@
|
||||||
<FIELD indexable="true" name="categoryid" result="false" stat="false" tokenizable="false" xpath="distinct-values(//*[local-name()='entity']/*[local-name()='result']/context/category/@id)"/>
|
<FIELD indexable="true" name="categoryid" result="false" stat="false" tokenizable="false" xpath="distinct-values(//*[local-name()='entity']/*[local-name()='result']/context/category/@id)"/>
|
||||||
<FIELD indexable="true" name="conceptname" result="false" stat="false" tokenizable="false" xpath="distinct-values(//*[local-name()='entity']/*[local-name()='result']/context/category//concept/@label)"/><!-- new index field for country info from different xpaths for any type of entity -->
|
<FIELD indexable="true" name="conceptname" result="false" stat="false" tokenizable="false" xpath="distinct-values(//*[local-name()='entity']/*[local-name()='result']/context/category//concept/@label)"/><!-- new index field for country info from different xpaths for any type of entity -->
|
||||||
<FIELD indexable="true" name="country" result="false" stat="false" tokenizable="false" xpath="distinct-values(//*[local-name()='entity']/*/country/@classid | //*[local-name()='entity']/*//rel[./to/@type='organization']/country/@classid | //*[local-name()='entity']//funder/@jurisdiction)"/>
|
<FIELD indexable="true" name="country" result="false" stat="false" tokenizable="false" xpath="distinct-values(//*[local-name()='entity']/*/country/@classid | //*[local-name()='entity']/*//rel[./to/@type='organization']/country/@classid | //*[local-name()='entity']//funder/@jurisdiction)"/>
|
||||||
|
<FIELD indexable="true" name="countrynojurisdiction" result="false" stat="false" tokenizable="false" xpath="distinct-values(//*[local-name()='entity']/*/country/@classid | //*[local-name()='entity']/*//rel[./to/@type='organization']/country/@classid)"/>
|
||||||
<FIELD indexable="false" name="oafentity" result="true" stat="false" tokenizable="false" xpath="//*[local-name() = 'entity']"/><!-- impact indicators -->
|
<FIELD indexable="false" name="oafentity" result="true" stat="false" tokenizable="false" xpath="//*[local-name() = 'entity']"/><!-- impact indicators -->
|
||||||
<FIELD copy="false" indexable="true" multivalued="false" name="influence" result="false" stat="false" type="pfloat" xpath="//measure[@id='influence']/@score/number()"/>
|
<FIELD copy="false" indexable="true" multivalued="false" name="influence" result="false" stat="false" type="pfloat" xpath="//measure[@id='influence']/@score/number()"/>
|
||||||
<FIELD copy="false" indexable="true" multivalued="false" name="influence_class" result="false" stat="false" type="string" xpath="//measure[@id='influence']/@class/string()"/>
|
<FIELD copy="false" indexable="true" multivalued="false" name="influence_class" result="false" stat="false" type="string" xpath="//measure[@id='influence']/@class/string()"/>
|
||||||
|
|
|
@ -194,228 +194,173 @@
|
||||||
<fieldType name="tints" class="solr.TrieIntField" positionIncrementGap="0" docValues="true" multiValued="true" precisionStep="8"/>
|
<fieldType name="tints" class="solr.TrieIntField" positionIncrementGap="0" docValues="true" multiValued="true" precisionStep="8"/>
|
||||||
<fieldType name="tlong" class="solr.TrieLongField" positionIncrementGap="0" docValues="true" precisionStep="8"/>
|
<fieldType name="tlong" class="solr.TrieLongField" positionIncrementGap="0" docValues="true" precisionStep="8"/>
|
||||||
<fieldType name="tlongs" class="solr.TrieLongField" positionIncrementGap="0" docValues="true" multiValued="true" precisionStep="8"/>
|
<fieldType name="tlongs" class="solr.TrieLongField" positionIncrementGap="0" docValues="true" multiValued="true" precisionStep="8"/>
|
||||||
|
|
||||||
<!-- Indexed fields -->
|
|
||||||
<field name="__all" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
<field name="__all" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="__deleted" type="boolean" default="false" omitNorms="true" omitTermFreqAndPositions="true" indexed="true" stored="false"/>
|
|
||||||
<field name="__dsid" type="string" omitNorms="true" omitTermFreqAndPositions="true" indexed="true" stored="true"/>
|
|
||||||
<field name="__dsversion" type="pdate" omitNorms="true" omitTermFreqAndPositions="true" indexed="true" stored="true"/>
|
|
||||||
<field name="__indexrecordidentifier" type="string" multiValued="false" indexed="true" required="true" stored="true"/>
|
<field name="__indexrecordidentifier" type="string" multiValued="false" indexed="true" required="true" stored="true"/>
|
||||||
<field name="__result" type="string" docValues="false" multiValued="false" indexed="false" stored="true"/>
|
|
||||||
<field name="__json" type="string" docValues="false" multiValued="false" indexed="false" stored="true"/>
|
<field name="__json" type="string" docValues="false" multiValued="false" indexed="false" stored="true"/>
|
||||||
|
<field name="__result" type="string" docValues="false" multiValued="false" indexed="false" stored="true"/>
|
||||||
<field name="_root_" type="string" docValues="false" indexed="true" stored="false"/>
|
<field name="_root_" type="string" docValues="false" indexed="true" stored="false"/>
|
||||||
<field name="_version_" type="long" multiValued="false" indexed="true" stored="true"/>
|
<field name="_version_" type="long" multiValued="false" indexed="true" stored="true"/>
|
||||||
<field name="authorid" type="string_ci" multiValued="true" indexed="true" stored="false"/>
|
<field name="authorid" type="string_ci" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="authoridtype" type="string_ci" multiValued="true" indexed="true" stored="false"/>
|
<field name="categoryid" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="categoryid" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="citation_count" type="pint" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="categoryname" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="citation_count_class" type="string" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="collectedfrom" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="collectedfromdatasourceid" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="collectedfromdatasourceid" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="collectedfromname" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="collectedfromname" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="community" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="community" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="communityid" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="communityid" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="conceptname" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="communityname" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="contextid" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="conceptid" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="contextname" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="conceptname" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="country" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="contextid" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="countrynojurisdiction" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="contextname" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="datasourcecompatibilityid" type="string" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="contexttype" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="datasourcecompatibilityname" type="string" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="country" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="datasourceenglishname" type="text_common" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="datasourcecompatibilityid" type="string" multiValued="false" indexed="true" stored="false"/>
|
|
||||||
<field name="datasourcecompatibilityname" type="string" multiValued="false" indexed="true" stored="false"/>
|
|
||||||
<field name="datasourceenglishname" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
|
||||||
<field name="datasourcejurisdiction" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
<field name="datasourcejurisdiction" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="datasourceodcontenttypes" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="datasourceodcontenttypes" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="datasourceoddescription" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
<field name="datasourceoddescription" type="text_common" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="datasourceodlanguages" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="datasourceodlanguages" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="datasourceodsubjects" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="datasourceodsubjects" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="datasourceofficialname" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
<field name="datasourceofficialname" type="text_common" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="datasourcesubject" type="ngramtext" multiValued="true" indexed="true" stored="false"/>
|
<field name="datasourcesubject" type="ngramtext" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="datasourcethematic" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
<field name="datasourcethematic" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="datasourcetypename" type="string" multiValued="false" indexed="true" stored="false"/>
|
<field name="datasourcetypename" type="string" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="datasourcetypeuiid" type="string" multiValued="false" indexed="true" stored="false"/>
|
<field name="datasourcetypeuiid" type="string" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="datasourcetypeuiname" type="string" multiValued="false" indexed="true" stored="false"/>
|
<field name="datasourcetypeuiname" type="string" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="dateofcollection" type="pdate" multiValued="false" indexed="true" stored="false"/>
|
<field name="dateofcollection" type="date" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="deletedbyinference" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="deletedbyinference" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="eoscdatasourcetype" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
<field name="eoscdatasourcetype" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="eoscifguidelines" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
<field name="eoscifguidelines" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="eosctype" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
<field name="eosctype" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="externalrefclass" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="externalreflabel" type="text_common" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="externalrefid" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="fos" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="externalreflabel" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
<field name="foslabel" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="externalrefsite" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="funder" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="funder" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="funderid" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="funderid" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="fundershortname" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="funderjurisdiction" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="fundinglevel0_description" type="text_common" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="fundername" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="fundinglevel0_id" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="funderoriginalname" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="fundinglevel0_name" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="fundershortname" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="fundinglevel1_description" type="text_common" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="fundinglevel0_description" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
<field name="fundinglevel1_id" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="fundinglevel0_id" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="fundinglevel1_name" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="fundinglevel0_name" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="fundinglevel2_description" type="text_common" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="fundinglevel1_description" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
<field name="fundinglevel2_id" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="fundinglevel1_id" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="fundinglevel2_name" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="fundinglevel1_name" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="haslicense" type="boolean" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="fundinglevel2_description" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
<field name="impulse" type="pint" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="fundinglevel2_id" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="impulse_class" type="string" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="fundinglevel2_name" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="influence" type="pfloat" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="inferenceprovenance" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="influence_class" type="string" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="inferred" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="instancetypename" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="instancetypename" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="isgreen" type="boolean" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="oafentity" type="string" multiValued="true" indexed="false" stored="false"/>
|
<field name="isindiamondjournal" type="boolean" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="oaftype" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="oafentity" type="string" docValues="false" multiValued="true" indexed="false" stored="false"/>
|
||||||
<field name="objidentifier" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="oaftype" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="organizationalternativenames" type="ngramtext" multiValued="true" indexed="true" stored="false"/>
|
<field name="objidentifier" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="organizationcountryname" type="string" multiValued="false" indexed="true" stored="false"/>
|
<field name="openaccesscolor" type="string" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="organizationdupid" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="orcidtypevalue" type="string_ci" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="organizationecenterprise" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
<field name="organizationalternativenames" type="ngramtext" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="organizationecinternationalorganization" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
<field name="organizationdupid" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="organizationecinternationalorganizationeurinterests" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
<field name="organizationlegalname" type="ngramtext" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="organizationeclegalbody" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
<field name="organizationlegalshortname" type="ngramtext" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="organizationeclegalperson" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
<field name="originalid" type="string_ci" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="organizationecnonprofit" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
<field name="peerreviewed" type="boolean" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="organizationecnutscode" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
<field name="pid" type="string_ci" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="organizationecresearchorganization" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
<field name="pidclassid" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="organizationecsmevalidated" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
<field name="popularity" type="pfloat" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="organizationlegalname" type="ngramtext" multiValued="true" indexed="true" stored="false"/>
|
<field name="popularity_alt" type="pfloat" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="organizationlegalshortname" type="ngramtext" multiValued="true" indexed="true" stored="false"/>
|
<field name="popularity_alt_class" type="string" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="originalid" type="string_ci" multiValued="true" indexed="true" stored="false"/>
|
<field name="popularity_class" type="string" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="pid" type="string_ci" multiValued="true" indexed="true" stored="false"/>
|
<field name="projectacronym" type="ngramtext" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="pidclassid" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="projectcallidentifier" type="string" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="pidclassname" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="projectcode" type="ngramtext" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="projectacronym" type="ngramtext" multiValued="true" indexed="true" stored="false"/>
|
<field name="projectcode_nt" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="projectcallidentifier" type="string" multiValued="false" indexed="true" stored="false"/>
|
<field name="projectduration" type="string" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="projectcode" type="ngramtext" multiValued="true" indexed="true" stored="false"/>
|
<field name="projectecsc39" type="string" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="projectcode_nt" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="projectenddate" type="date" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="projectcontracttypename" type="string" multiValued="false" indexed="true" stored="false"/>
|
<field name="projectendyear" type="string" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="projectduration" type="string" multiValued="false" indexed="true" stored="false"/>
|
<field name="projectkeywords" type="text_common" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="projectecarticle29_3" type="string" multiValued="false" indexed="true" stored="false"/>
|
<field name="projectoamandatepublications" type="string" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="projectecsc39" type="string" multiValued="false" indexed="true" stored="false"/>
|
<field name="projectstartdate" type="date" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="projectenddate" type="pdate" multiValued="false" indexed="true" stored="false"/>
|
<field name="projectstartyear" type="string" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="projectendyear" type="string" multiValued="false" indexed="true" stored="false"/>
|
<field name="projecttitle" type="ngramtext" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="projectkeywords" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
<field name="projecttitle_alternative" type="text_en" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="projectoamandatepublications" type="string" multiValued="false" indexed="true" stored="false"/>
|
<field name="provenanceactionclassid" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="projectstartdate" type="pdate" multiValued="false" indexed="true" stored="false"/>
|
<field name="publiclyfunded" type="boolean" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="projectstartyear" type="string" multiValued="false" indexed="true" stored="false"/>
|
<field name="relclass" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="projectsubject" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="relcontracttypename" type="text_common" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="projecttitle" type="ngramtext" multiValued="true" indexed="true" stored="false"/>
|
<field name="reldatasourcecompatibilityid" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="provenanceactionclassid" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="relfunder" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relclass" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="relfunderid" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relcollectedfromid" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="relfundershortname" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relcollectedfromname" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="relfundinglevel0_id" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relcontracttypeid" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="relfundinglevel0_name" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relcontracttypename" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
<field name="relfundinglevel1_id" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="reldatasourcecompatibilityid" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="relfundinglevel1_name" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relfunder" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="relfundinglevel2_id" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relfunderid" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="relfundinglevel2_name" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relfunderjurisdiction" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="relorganizationcountryid" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relfundername" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="relorganizationcountryname" type="text_common" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relfundershortname" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="relorganizationid" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relfundinglevel0_id" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="relorganizationname" type="text_common" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relfundinglevel0_name" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="relorganizationshortname" type="text_common" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relfundinglevel1_id" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="relproject" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relfundinglevel1_name" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="relprojectcode" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relfundinglevel2_id" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="relprojectid" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relfundinglevel2_name" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="relprojectname" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relinferenceprovenance" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="relprojecttitle" type="text_common" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relinferred" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="relresultid" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relorganizationcountryid" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="relresulttype" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relorganizationcountryname" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
<field name="resultacceptanceyear" type="string" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="relorganizationid" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="resultauthor" type="text_common" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relorganizationname" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
<field name="resultbestaccessright" type="string" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="relorganizationshortname" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
<field name="resultdateofacceptance" type="date" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="relproject" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="resultdescription" type="text_en" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relprojectcode" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="resultdupid" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relprojectid" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="resultembargoenddate" type="date" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="relprojectname" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="resultembargoendyear" type="string" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="relprojecttitle" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
<field name="resulthostingdatasource" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relprovenanceactionclassid" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="resulthostingdatasourceid" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relresultid" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="resultidentifier" type="string_ci" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="relresulttype" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="resultlanguagename" type="string" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="reltrust" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="resultpublisher" type="text_common" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="resultacceptanceyear" type="string" multiValued="false" indexed="true" stored="false"/>
|
<field name="resultsource" type="text_common" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="resultaccessright" type="string" multiValued="true" indexed="true" stored="false"/>
|
<field name="resultsubject" type="text_en" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="resultauthor" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
<field name="resulttitle" type="text_en" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="resultauthor_nt" type="string_ci" multiValued="true" indexed="true" stored="false"/>
|
<field name="resulttypeid" type="string" docValues="false" multiValued="false" indexed="true" stored="false"/>
|
||||||
<field name="resultbestaccessright" type="string" multiValued="false" indexed="true" stored="false"/>
|
<field name="sdg" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="resultdateofacceptance" type="pdate" multiValued="false" indexed="true" stored="false"/>
|
<field name="semrelid" type="string" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="resultdescription" type="text_en" multiValued="true" indexed="true" stored="false"/>
|
<field name="status" type="string_ci" docValues="false" multiValued="true" indexed="true" stored="false"/>
|
||||||
<field name="resultdupid" type="string" multiValued="true" indexed="true" stored="false"/>
|
|
||||||
<field name="resultembargoenddate" type="pdate" multiValued="false" indexed="true" stored="false"/>
|
|
||||||
<field name="resultembargoendyear" type="string" multiValued="false" indexed="true" stored="false"/>
|
|
||||||
<field name="resulthostingdatasource" type="string" multiValued="true" indexed="true" stored="false"/>
|
|
||||||
<field name="resulthostingdatasourceid" type="string" multiValued="true" indexed="true" stored="false"/>
|
|
||||||
<field name="resulthostingdatasourcename" type="string" multiValued="true" indexed="true" stored="false"/>
|
|
||||||
<field name="resultidentifier" type="string" multiValued="true" indexed="true" stored="false"/>
|
|
||||||
<field name="resultlanguagename" type="string" multiValued="false" indexed="true" stored="false"/>
|
|
||||||
<field name="resultlicense" type="string" multiValued="true" indexed="true" stored="false"/>
|
|
||||||
<field name="resultpublisher" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
|
||||||
<field name="resultsource" type="text_common" multiValued="true" indexed="true" stored="false"/>
|
|
||||||
<field name="resultsubject" type="text_en" multiValued="true" indexed="true" stored="false"/>
|
|
||||||
<field name="resultsubjectclass" type="string" multiValued="true" indexed="true" stored="false"/>
|
|
||||||
<field name="resulttitle" type="text_en" multiValued="true" indexed="true" stored="false"/>
|
|
||||||
<field name="resulttypeid" type="string" multiValued="false" indexed="true" stored="false"/>
|
|
||||||
<field name="resulttypename" type="string" multiValued="false" indexed="true" stored="false"/>
|
|
||||||
<field name="semrelid" type="string" multiValued="true" indexed="true" stored="false"/>
|
|
||||||
<field name="text" type="text_common" indexed="false" stored="false"/>
|
<field name="text" type="text_common" indexed="false" stored="false"/>
|
||||||
<field name="trust" type="string" multiValued="true" indexed="true" stored="false"/>
|
|
||||||
<field name="versioning" type="string" multiValued="true" indexed="true" stored="false"/>
|
|
||||||
<field name="isgreen" type="boolean" multiValued="false" indexed="true" stored="false"/>
|
|
||||||
<field name="openaccesscolor" type="string" multiValued="false" indexed="true" stored="false"/>
|
|
||||||
<field name="isindiamondjournal" type="boolean" multiValued="false" indexed="true" stored="false"/>
|
|
||||||
<field name="publiclyfunded" type="boolean" multiValued="false" indexed="true" stored="false"/>
|
|
||||||
<field name="peerreviewed" type="boolean" multiValued="false" indexed="true" stored="false"/>
|
|
||||||
|
|
||||||
<!-- Copy field definitions follow: -->
|
|
||||||
|
|
||||||
<!-- Data source -->
|
|
||||||
<copyField source="datasourceenglishname" dest="__all"/>
|
<copyField source="datasourceenglishname" dest="__all"/>
|
||||||
<copyField source="datasourceoddescription" dest="__all"/>
|
<copyField source="datasourceoddescription" dest="__all"/>
|
||||||
|
<copyField source="datasourceodsubjects" dest="__all"/>
|
||||||
<copyField source="datasourceofficialname" dest="__all"/>
|
<copyField source="datasourceofficialname" dest="__all"/>
|
||||||
<copyField source="datasourcesubject" dest="__all"/>
|
<copyField source="datasourcesubject" dest="__all"/>
|
||||||
|
<copyField source="externalreflabel" dest="__all"/>
|
||||||
<!-- Organization -->
|
<copyField source="fundinglevel0_description" dest="__all"/>
|
||||||
|
<copyField source="fundinglevel1_description" dest="__all"/>
|
||||||
|
<copyField source="fundinglevel2_description" dest="__all"/>
|
||||||
<copyField source="organizationalternativenames" dest="__all"/>
|
<copyField source="organizationalternativenames" dest="__all"/>
|
||||||
<copyField source="organizationecenterprise" dest="__all"/>
|
|
||||||
<copyField source="organizationecinternationalorganization" dest="__all"/>
|
|
||||||
<copyField source="organizationecinternationalorganizationeurinterests" dest="__all"/>
|
|
||||||
<copyField source="organizationeclegalbody" dest="__all"/>
|
|
||||||
<copyField source="organizationeclegalperson" dest="__all"/>
|
|
||||||
<copyField source="organizationecnonprofit" dest="__all"/>
|
|
||||||
<copyField source="organizationecnutscode" dest="__all"/>
|
|
||||||
<copyField source="organizationecresearchorganization" dest="__all"/>
|
|
||||||
<copyField source="organizationecsmevalidated" dest="__all"/>
|
|
||||||
<copyField source="organizationlegalname" dest="__all"/>
|
<copyField source="organizationlegalname" dest="__all"/>
|
||||||
<copyField source="organizationlegalshortname" dest="__all"/>
|
<copyField source="organizationlegalshortname" dest="__all"/>
|
||||||
|
|
||||||
<!-- Project -->
|
|
||||||
<copyField source="projectacronym" dest="__all"/>
|
<copyField source="projectacronym" dest="__all"/>
|
||||||
<copyField source="projectcode" dest="__all"/>
|
<copyField source="projectcode" dest="__all"/>
|
||||||
<copyField source="projectkeywords" dest="__all"/>
|
<copyField source="projectkeywords" dest="__all"/>
|
||||||
<copyField source="projecttitle" dest="__all"/>
|
<copyField source="projecttitle" dest="__all"/>
|
||||||
|
<copyField source="projecttitle_alternative" dest="__all"/>
|
||||||
<!-- Result -->
|
|
||||||
<copyField source="resultpublisher" dest="__all"/>
|
|
||||||
<copyField source="resultsource" dest="__all"/>
|
|
||||||
<copyField source="resultidentifier" dest="__all"/>
|
|
||||||
<copyField source="resultauthor" dest="__all"/>
|
|
||||||
<copyField source="resulttitle" dest="__all"/>
|
|
||||||
<copyField source="resultdescription" dest="__all"/>
|
|
||||||
<copyField source="resultsubject" dest="__all"/>
|
|
||||||
<copyField source="resultacceptanceyear" dest="__all"/>
|
|
||||||
|
|
||||||
<!-- Other -->
|
|
||||||
<copyField source="externalreflabel" dest="__all"/>
|
|
||||||
|
|
||||||
<copyField source="fundinglevel0_description" dest="__all"/>
|
|
||||||
<copyField source="fundinglevel1_description" dest="__all"/>
|
|
||||||
<copyField source="fundinglevel2_description" dest="__all"/>
|
|
||||||
|
|
||||||
<copyField source="relcontracttypename" dest="__all"/>
|
<copyField source="relcontracttypename" dest="__all"/>
|
||||||
<copyField source="relorganizationcountryname" dest="__all"/>
|
<copyField source="relorganizationcountryname" dest="__all"/>
|
||||||
<copyField source="relorganizationname" dest="__all"/>
|
<copyField source="relorganizationname" dest="__all"/>
|
||||||
<copyField source="relorganizationshortname" dest="__all"/>
|
<copyField source="relorganizationshortname" dest="__all"/>
|
||||||
<copyField source="relprojecttitle" dest="__all"/>
|
|
||||||
<copyField source="relprojectname" dest="__all"/>
|
<copyField source="relprojectname" dest="__all"/>
|
||||||
|
<copyField source="relprojecttitle" dest="__all"/>
|
||||||
|
<copyField source="resultacceptanceyear" dest="__all"/>
|
||||||
|
<copyField source="resultauthor" dest="__all"/>
|
||||||
|
<copyField source="resultdescription" dest="__all"/>
|
||||||
|
<copyField source="resultidentifier" dest="__all"/>
|
||||||
|
<copyField source="resultpublisher" dest="__all"/>
|
||||||
|
<copyField source="resultsource" dest="__all"/>
|
||||||
|
<copyField source="resulttitle" dest="__all"/>
|
||||||
</schema>
|
</schema>
|
Binary file not shown.
2
pom.xml
2
pom.xml
|
@ -960,7 +960,7 @@
|
||||||
<commons.logging.version>1.1.3</commons.logging.version>
|
<commons.logging.version>1.1.3</commons.logging.version>
|
||||||
<commons-validator.version>1.7</commons-validator.version>
|
<commons-validator.version>1.7</commons-validator.version>
|
||||||
<dateparser.version>1.0.7</dateparser.version>
|
<dateparser.version>1.0.7</dateparser.version>
|
||||||
<dhp-schemas.version>[6.1.3-SNAPSHOT]</dhp-schemas.version>
|
<dhp-schemas.version>[6.1.3]</dhp-schemas.version>
|
||||||
<dhp.cdh.version>cdh5.9.2</dhp.cdh.version>
|
<dhp.cdh.version>cdh5.9.2</dhp.cdh.version>
|
||||||
<dhp.commons.lang.version>3.5</dhp.commons.lang.version>
|
<dhp.commons.lang.version>3.5</dhp.commons.lang.version>
|
||||||
<dhp.guava.version>11.0.2</dhp.guava.version>
|
<dhp.guava.version>11.0.2</dhp.guava.version>
|
||||||
|
|
Loading…
Reference in New Issue