Author: mattmann
Date: Tue Sep 21 03:25:42 2010
New Revision: 999200
URL: http://svn.apache.org/viewvc?rev=999200&view=rev
Log:
- fix for NUTCH-901 Make index-more plug-in configurable
Modified:
nutch/branches/branch-1.2/CHANGES.txt
nutch/branches/branch-1.2/conf/nutch-default.xml
nutch/branches/branch-1.2/src/plugin/index-more/src/java/org/apache/nutch/indexer/more/MoreIndexingFilter.java
Modified: nutch/branches/branch-1.2/CHANGES.txt
URL:
http://svn.apache.org/viewvc/nutch/branches/branch-1.2/CHANGES.txt?rev=999200&r1=999199&r2=999200&view=diff
==============================================================================
--- nutch/branches/branch-1.2/CHANGES.txt (original)
+++ nutch/branches/branch-1.2/CHANGES.txt Tue Sep 21 03:25:42 2010
@@ -2,6 +2,8 @@ Nutch Change Log
Release 1.2 - 09/18/2010
+* NUTCH-901 Make index-more plug-in configurable (Markus Jelsma via mattmann)
+
* NUTCH-908 Infinite Loop and Null Pointer Bugs in Searching (kubes via
mattmann)
* NUTCH-906 Nutch OpenSearch sometimes raises DOMExceptions (Asheesh Laroia
via ab)
Modified: nutch/branches/branch-1.2/conf/nutch-default.xml
URL:
http://svn.apache.org/viewvc/nutch/branches/branch-1.2/conf/nutch-default.xml?rev=999200&r1=999199&r2=999200&view=diff
==============================================================================
--- nutch/branches/branch-1.2/conf/nutch-default.xml (original)
+++ nutch/branches/branch-1.2/conf/nutch-default.xml Tue Sep 21 03:25:42 2010
@@ -764,6 +764,19 @@
</description>
</property>
+
+<!-- moreindexingfilter plugin properties -->
+
+<property>
+ <name>moreIndexingFilter.indexMimeTypeParts</name>
+ <value>true</value>
+ <description>Determines whether the index-more plugin will split the
mime-type
+ in sub parts, this requires the type field to be multi valued. Set to true
for backward
+ compatibility. False will not split the mime-type.
+ </description>
+</property>
+
+
<!-- indexingfilter plugin properties -->
<property>
Modified:
nutch/branches/branch-1.2/src/plugin/index-more/src/java/org/apache/nutch/indexer/more/MoreIndexingFilter.java
URL:
http://svn.apache.org/viewvc/nutch/branches/branch-1.2/src/plugin/index-more/src/java/org/apache/nutch/indexer/more/MoreIndexingFilter.java?rev=999200&r1=999199&r2=999200&view=diff
==============================================================================
---
nutch/branches/branch-1.2/src/plugin/index-more/src/java/org/apache/nutch/indexer/more/MoreIndexingFilter.java
(original)
+++
nutch/branches/branch-1.2/src/plugin/index-more/src/java/org/apache/nutch/indexer/more/MoreIndexingFilter.java
Tue Sep 21 03:25:42 2010
@@ -225,10 +225,13 @@ public class MoreIndexingFilter implemen
doc.add("type", contentType);
- String[] parts = getParts(contentType);
+ // Check if we need to split the content type in sub parts
+ if (conf.getBoolean("moreIndexingFilter.indexMimeTypeParts", true)) {
+ String[] parts = getParts(contentType);
- for(String part: parts) {
- doc.add("type", part);
+ for(String part: parts) {
+ doc.add("type", part);
+ }
}
// leave this for future improvement