You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by jn...@apache.org on 2010/02/15 10:41:06 UTC
svn commit: r910187 -
/lucene/nutch/trunk/src/java/org/apache/nutch/parse/ParserFactory.java
Author: jnioche
Date: Mon Feb 15 09:41:05 2010
New Revision: 910187
URL: http://svn.apache.org/viewvc?rev=910187&view=rev
Log:
NUTCH-766: small improvement to Tika parser : prioritise default Tika parser when discovering plugins matching mime-type
Modified:
lucene/nutch/trunk/src/java/org/apache/nutch/parse/ParserFactory.java
Modified: lucene/nutch/trunk/src/java/org/apache/nutch/parse/ParserFactory.java
URL: http://svn.apache.org/viewvc/lucene/nutch/trunk/src/java/org/apache/nutch/parse/ParserFactory.java?rev=910187&r1=910186&r2=910187&view=diff
==============================================================================
--- lucene/nutch/trunk/src/java/org/apache/nutch/parse/ParserFactory.java (original)
+++ lucene/nutch/trunk/src/java/org/apache/nutch/parse/ParserFactory.java Mon Feb 15 09:41:05 2010
@@ -343,11 +343,14 @@
// NotMappedParserException
for (int i=0; i<extensions.length; i++) {
- if ((extensions[i].getAttribute("contentType") != null
+ if (extensions[i].getAttribute("contentType") != null
&& extensions[i].getAttribute("contentType").equals(
- contentType)) || "*".equals(extensions[i].getAttribute("contentType") )) {
+ contentType)) {
extList.add(extensions[i]);
}
+ else if ("*".equals(extensions[i].getAttribute("contentType"))){
+ extList.add(0, extensions[i]);
+ }
}
if (extList.size() > 0) {