Fixed invalid dates in input
Change-Id: I95e28499de2afca536e9d02e9d75e2d63abede1b
diff --git a/src/main/java/de/ids_mannheim/korap/index/FieldDocument.java b/src/main/java/de/ids_mannheim/korap/index/FieldDocument.java
index 89e839a..e8730ed 100644
--- a/src/main/java/de/ids_mannheim/korap/index/FieldDocument.java
+++ b/src/main/java/de/ids_mannheim/korap/index/FieldDocument.java
@@ -79,7 +79,8 @@
public void addInt (String key, String value) {
- this.addInt(key, Integer.parseInt(value));
+ if (value != null)
+ this.addInt(key, Integer.parseInt(value));
};
@@ -284,7 +285,9 @@
@Override
public KrillDate setPubDate (String pubDate) {
KrillDate date = super.setPubDate(pubDate);
- this.addInt("pubDate", date.toString());
+ if (date != null) {
+ this.addInt("pubDate", date.toString());
+ };
return date;
};
@@ -293,7 +296,9 @@
@Override
public KrillDate setCreationDate (String creationDate) {
KrillDate date = super.setCreationDate(creationDate);
- this.addInt("creationDate", date.toString());
+ if (date != null) {
+ this.addInt("creationDate", date.toString());
+ };
return date;
};
diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties
index 2805e78..074fbae 100644
--- a/src/main/resources/log4j.properties
+++ b/src/main/resources/log4j.properties
@@ -1,4 +1,4 @@
-log4j.rootLogger = ERROR, stdout
+# log4j.rootLogger = ERROR, stdout
# Queries:
# log4j.logger.de.ids_mannheim.korap.query.SpanNextQuery = TRACE, stdout
@@ -32,6 +32,7 @@
# log4j.logger.de.ids_mannheim.korap.response.Match = TRACE, stdout
# Index:
+log4j.logger.de.ids_mannheim.korap.index.Indexer = INFO, stdout
# log4j.logger.de.ids_mannheim.korap.KrillIndex = TRACE, stdout
# log4j.logger.de.ids_mannheim.korap.index.PositionsToOffset = TRACE, stdout
# log4j.logger.de.ids_mannheim.korap.index.MultiTermTokenStream = TRACE, stdout