Author: lewismc
Date: Thu Nov  8 14:13:11 2012
New Revision: 1407089

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

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

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=1407089&r1=1407088&r2=1407089&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
 Thu Nov  8 14:13:11 2012
@@ -168,11 +168,12 @@ public class MoreIndexingFilter implemen
   private NutchDocument addLength(NutchDocument doc, ParseData data, String 
url) {
     String contentLength = data.getMeta(Response.CONTENT_LENGTH);
 
-    if (contentLength != null)
+    if (contentLength != null) {
       // NUTCH-1010 ContentLength not trimmed
       String trimmed = contentLength.toString().trim();
       if (!trimmed.isEmpty())
         doc.add("contentLength", trimmed);
+    }
     return doc;
   }
 


Reply via email to