[
https://issues.apache.org/jira/browse/NUTCH-1990?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sebastian Nagel updated NUTCH-1990:
-----------------------------------
Attachment: NUTCH-1990-trial1.patch
Sounds reasonable and would "en passant" resolve NUTCH-1062. But a trial
(attached) was only partially successful because URI.normalize() does not
- remove leading "/.." (should be definitely done according [RFC 3986, section
5.2.4, 2A|http://tools.ietf.org/html/rfc3986#section-5.2.4])
- add a "/" if path is/gets empty
After adding these two steps unit tests passed, except one which in fact was
wrong before ("http://foo.com/aa/.." should be normalized to "http://foo.com/").
The patch is definitely not ready: the old version checks first whether there
is a path element to be normalized which can have massive performance impact.
In any case, we should compare old and new version regarding quality and
performance with a larger set of unnormalized outlinks.
> Use URI.normalise() in BasicURLNormalizer
> -----------------------------------------
>
> Key: NUTCH-1990
> URL: https://issues.apache.org/jira/browse/NUTCH-1990
> Project: Nutch
> Issue Type: Improvement
> Affects Versions: 1.9
> Reporter: Julien Nioche
> Assignee: Julien Nioche
> Attachments: NUTCH-1990-trial1.patch
>
>
> One of the things that
> [BasicURLNormalizer|https://github.com/apache/nutch/blob/trunk/src/plugin/urlnormalizer-basic/src/java/org/apache/nutch/net/urlnormalizer/basic/BasicURLNormalizer.java]
> is to remove unnecessary dot segments in path.
> Instead of implementing the logic ourselves with some antiquated regex
> library, we should simply use
> [http://docs.oracle.com/javase/7/docs/api/java/net/URI.html#normalize()]
> which does the same and is probably more efficient.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)