Apache Nutch is an extensible and scalable web crawler
NUTCH-732 Subcollection plugin not working.
Andrzej Bialecki8ce95a7857f4
diff --git a/CHANGES.txt b/CHANGES.txtindex 440529810..0a5b0b163 100644--- a/CHANGES.txt+++ b/CHANGES.txt@@ -2,6 +2,8 @@ Nutch Change LogRelease 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)diff --git a/src/plugin/subcollection/src/java/org/apache/nutch/collection/CollectionManager.java b/src/plugin/subcollection/src/java/org/apache/nutch/collection/CollectionManager.javaindex 039b82c4d..52ba2733a 100644--- a/src/plugin/subcollection/src/java/org/apache/nutch/collection/CollectionManager.java+++ b/src/plugin/subcollection/src/java/org/apache/nutch/collection/CollectionManager.java@@ -170,18 +170,21 @@ public class CollectionManager extends Configured {* @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();}/**diff --git a/src/plugin/subcollection/src/java/org/apache/nutch/indexer/subcollection/SubcollectionIndexingFilter.java b/src/plugin/subcollection/src/java/org/apache/nutch/indexer/subcollection/SubcollectionIndexingFilter.javaindex 71d4bb1af..0c4d23065 100644--- a/src/plugin/subcollection/src/java/org/apache/nutch/indexer/subcollection/SubcollectionIndexingFilter.java+++ b/src/plugin/subcollection/src/java/org/apache/nutch/indexer/subcollection/SubcollectionIndexingFilter.java@@ -75,6 +75,6 @@ public class SubcollectionIndexingFilter extends Configured implements IndexingFpublic void addIndexBackendOptions(Configuration conf) {LuceneWriter.addFieldOptions(FIELD_NAME, LuceneWriter.STORE.YES,- LuceneWriter.INDEX.UNTOKENIZED, conf);+ LuceneWriter.INDEX.TOKENIZED, conf);}}