Author: ab
Date: Tue Apr 27 18:16:34 2010
New Revision: 938592

URL: http://svn.apache.org/viewvc?rev=938592&view=rev
Log:
NUTCH-732 Subcollection plugin not working.

Modified:
    lucene/nutch/trunk/CHANGES.txt
    
lucene/nutch/trunk/src/plugin/subcollection/src/java/org/apache/nutch/collection/CollectionManager.java
    
lucene/nutch/trunk/src/plugin/subcollection/src/java/org/apache/nutch/indexer/subcollection/SubcollectionIndexingFilter.java

Modified: lucene/nutch/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/lucene/nutch/trunk/CHANGES.txt?rev=938592&r1=938591&r2=938592&view=diff
==============================================================================
--- lucene/nutch/trunk/CHANGES.txt (original)
+++ lucene/nutch/trunk/CHANGES.txt Tue Apr 27 18:16:34 2010
@@ -2,6 +2,8 @@ Nutch Change Log
 
 Release 1.1 - 2010-04-06
 
+* NUTCH-732 Subcollection plugin not working (Filipe Antunes, ab)
+
 * NUTCH-815 Invalid blank line before If-Modified-Since header (Pascal 
Dimassimo via ab)
 
 * NUTCH-814 SegmentMerger bug (Rob Bradshaw, ab)

Modified: 
lucene/nutch/trunk/src/plugin/subcollection/src/java/org/apache/nutch/collection/CollectionManager.java
URL: 
http://svn.apache.org/viewvc/lucene/nutch/trunk/src/plugin/subcollection/src/java/org/apache/nutch/collection/CollectionManager.java?rev=938592&r1=938591&r2=938592&view=diff
==============================================================================
--- 
lucene/nutch/trunk/src/plugin/subcollection/src/java/org/apache/nutch/collection/CollectionManager.java
 (original)
+++ 
lucene/nutch/trunk/src/plugin/subcollection/src/java/org/apache/nutch/collection/CollectionManager.java
 Tue Apr 27 18:16:34 2010
@@ -170,18 +170,21 @@ public class CollectionManager extends C
    * @return Space delimited string of collection names url is part of
    */
   public String getSubCollections(final String url) {
-    String collections = "";
+    StringBuilder collections = new StringBuilder();
     final Iterator iterator = collectionMap.values().iterator();
 
     while (iterator.hasNext()) {
       final Subcollection subCol = (Subcollection) iterator.next();
       if (subCol.filter(url) != null) {
-        collections += " " + subCol.name;
+        if (collections.length() > 0) {
+          collections.append(' ');
+        }
+        collections.append(subCol.name);
       }
     }
     if (LOG.isTraceEnabled()) { LOG.trace("subcollections:" + collections); }
     
-    return collections;
+    return collections.toString();
   }
 
   /**

Modified: 
lucene/nutch/trunk/src/plugin/subcollection/src/java/org/apache/nutch/indexer/subcollection/SubcollectionIndexingFilter.java
URL: 
http://svn.apache.org/viewvc/lucene/nutch/trunk/src/plugin/subcollection/src/java/org/apache/nutch/indexer/subcollection/SubcollectionIndexingFilter.java?rev=938592&r1=938591&r2=938592&view=diff
==============================================================================
--- 
lucene/nutch/trunk/src/plugin/subcollection/src/java/org/apache/nutch/indexer/subcollection/SubcollectionIndexingFilter.java
 (original)
+++ 
lucene/nutch/trunk/src/plugin/subcollection/src/java/org/apache/nutch/indexer/subcollection/SubcollectionIndexingFilter.java
 Tue Apr 27 18:16:34 2010
@@ -75,6 +75,6 @@ public class SubcollectionIndexingFilter
 
   public void addIndexBackendOptions(Configuration conf) {
     LuceneWriter.addFieldOptions(FIELD_NAME, LuceneWriter.STORE.YES,
-        LuceneWriter.INDEX.UNTOKENIZED, conf);
+        LuceneWriter.INDEX.TOKENIZED, conf);
   }
 }


Reply via email to