[
https://issues.apache.org/jira/browse/NUTCH-1097?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13124761#comment-13124761
]
Ferdy commented on NUTCH-1097:
------------------------------
Hi,
As far as I know, currently parse-tika is used as a catch-all parser. So yes,
if you were to exclude parse-html, tika would just parse all html related
types. However the fact that Nutch still has a separate html parser indicates
that (for some reason) html should not be handled by tika yet. Since
application/xhtml+xml is actually also html but with a more uncommon mimetype I
believe it should be handled by the same parser that handles text/html. More
importantly, I would still not be able to specify that only text/html and
application/xhtml+xml should be parsed. ALL mimetypes will be parsed by the
catch-all handler, since you can only specify the wildcard or ONE mimetype per
parser.
The "text/html and application/xhtml+xml" use case is just a single example of
why there should be a bit more flexibility for configuring parsers. If somebody
wants to dispatch more than one mimetype (but not all) to a specific parser,
that just not possible. This is regardless of using a tika (or whatever parser)
as a catch-all parser.
Nevertheless my regex solution feels a bit hackish so it should be properly
documented when committed.
> application/xhtml+xml should be enabled in plugin.xml of parse-html; allow
> multiple mimetypes for plugin.xml
> ------------------------------------------------------------------------------------------------------------
>
> Key: NUTCH-1097
> URL: https://issues.apache.org/jira/browse/NUTCH-1097
> Project: Nutch
> Issue Type: Bug
> Components: parser
> Affects Versions: 1.3
> Reporter: Ferdy
> Priority: Minor
> Fix For: 1.4
>
> Attachments: NUTCH-1097-nutchgora_v1.patch, NUTCH-1097-v1.patch,
> NUTCH-1097-v2.patch, NUTCH-1097-v3.patch
>
>
> The configuration in parse-plugins.xml expects the parse-html plugin to
> accept application/xhtml+xml, however the plugin.xml of this plugin does not
> list this type. Either change the entry in parse-plugins.xml or change the
> parse-html plugin.xml. I suggest the latter. See patch.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira