Apache Nutch is an extensible and scalable web crawler
NUTCH-1493 Error adding field 'contentLength'='' during solrindex using index-more
Lewis John McGibbneye78cfc2ec230
diff --git a/CHANGES.txt b/CHANGES.txtindex 7c060e55a..62c9a2e39 100644--- a/CHANGES.txt+++ b/CHANGES.txt@@ -2,6 +2,8 @@ Nutch Change Log(trunk) Current Development:+* NUTCH-1493 Error adding field 'contentLength'='' during solrindex using index-more (Nathan Gass via lewismc)+* NUTCH-1491 Strip UTF-8 non-character codepoints in title (Nathan Gass via markus)* NUTCH-1421 RegexURLNormalizer to only skip rules with invalid patterns (snagel)diff --git a/src/plugin/index-more/src/java/org/apache/nutch/indexer/more/MoreIndexingFilter.java b/src/plugin/index-more/src/java/org/apache/nutch/indexer/more/MoreIndexingFilter.javaindex 406b37ae7..a0430e7a0 100644--- a/src/plugin/index-more/src/java/org/apache/nutch/indexer/more/MoreIndexingFilter.java+++ b/src/plugin/index-more/src/java/org/apache/nutch/indexer/more/MoreIndexingFilter.java@@ -170,8 +170,9 @@ public class MoreIndexingFilter implements IndexingFilter {if (contentLength != null)// NUTCH-1010 ContentLength not trimmed- doc.add("contentLength", contentLength.trim());-+ String trimmed = contentLength.toString().trim();+ if (!trimmed.isEmpty())+ doc.add("contentLength", trimmed);return doc;}