Revision 49824
Added by Claudio Atzori over 6 years ago
modules/dnet-openaire-exporter/branches/beta/dnet-openaire-exporter.iml | ||
---|---|---|
20 | 20 |
<orderEntry type="library" name="Maven: eu.dnetlib:dnet-pace-core:2.5.1" level="project" /> |
21 | 21 |
<orderEntry type="library" name="Maven: org.apache.solr:solr-solrj:5.5.4" level="project" /> |
22 | 22 |
<orderEntry type="library" name="Maven: org.apache.solr:solr-solrj:4.10.4" level="project" /> |
23 |
<orderEntry type="library" name="Maven: org.apache.solr:solr-solrj:4.10.4" level="project" /> |
|
23 | 24 |
<orderEntry type="library" name="Maven: eu.dnetlib:cnr-rmi-api:2.6.2-SNAPSHOT" level="project" /> |
24 | 25 |
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-core:3.1.5" level="project" /> |
25 | 26 |
<orderEntry type="library" name="Maven: org.codehaus.woodstox:woodstox-core-asl:4.4.1" level="project" /> |
modules/dnet-openaire-exporter/branches/beta/src/main/java/eu/dnetlib/openaire/exporter/datasource/clients/DatasourceIndexClient.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.io.IOException; |
4 | 4 |
import java.util.Calendar; |
5 |
import java.util.Date; |
|
5 | 6 |
import java.util.Map; |
6 | 7 |
import java.util.Queue; |
7 | 8 |
import java.util.concurrent.*; |
... | ... | |
161 | 162 |
if (rsp.getResults().getNumFound() > 0) { |
162 | 163 |
final SolrDocument doc = Iterables.getFirst(rsp.getResults(), null); |
163 | 164 |
|
164 |
final String dsversion = doc.get(DSVERSION).toString(); |
|
165 |
return StringUtils.substringBefore(dsversion, "T"); |
|
165 |
final Date dsversion = (Date) doc.getFirstValue(DSVERSION); |
|
166 |
log.debug("got __dsversion: " + dsversion); |
|
167 |
return DateFormatUtils.format(dsversion, DatasourceFunctions.DATE_FORMAT); |
|
166 | 168 |
} else { |
167 | 169 |
final String defaultDate = getDefaultLastIndexingDate(); |
168 | 170 |
log.debug("unable to find documents, defaulting to " + defaultDate); |
Also available in: Unified diff
fetch __dsversion properly