You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by le...@apache.org on 2012/11/07 19:54:16 UTC

svn commit: r1406752 - in /nutch/trunk: CHANGES.txt src/plugin/index-more/src/java/org/apache/nutch/indexer/more/MoreIndexingFilter.java

Author: lewismc
Date: Wed Nov  7 18:54:15 2012
New Revision: 1406752

URL: http://svn.apache.org/viewvc?rev=1406752&view=rev
Log:
NUTCH-1493 Error adding field 'contentLength'='' during solrindex using index-more

Modified:
    nutch/trunk/CHANGES.txt
    nutch/trunk/src/plugin/index-more/src/java/org/apache/nutch/indexer/more/MoreIndexingFilter.java

Modified: nutch/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/nutch/trunk/CHANGES.txt?rev=1406752&r1=1406751&r2=1406752&view=diff
==============================================================================
--- nutch/trunk/CHANGES.txt (original)
+++ nutch/trunk/CHANGES.txt Wed Nov  7 18:54:15 2012
@@ -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)

Modified: nutch/trunk/src/plugin/index-more/src/java/org/apache/nutch/indexer/more/MoreIndexingFilter.java
URL: http://svn.apache.org/viewvc/nutch/trunk/src/plugin/index-more/src/java/org/apache/nutch/indexer/more/MoreIndexingFilter.java?rev=1406752&r1=1406751&r2=1406752&view=diff
==============================================================================
--- nutch/trunk/src/plugin/index-more/src/java/org/apache/nutch/indexer/more/MoreIndexingFilter.java (original)
+++ nutch/trunk/src/plugin/index-more/src/java/org/apache/nutch/indexer/more/MoreIndexingFilter.java Wed Nov  7 18:54:15 2012
@@ -170,8 +170,9 @@ public class MoreIndexingFilter implemen
 
     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;
   }