Issue Details (XML | Word | Printable)

Key: NUTCH-255
Type: Improvement Improvement
Status: Closed Closed
Resolution: Duplicate
Priority: Trivial Trivial
Assignee: Unassigned
Reporter: Dennis Kubes
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Nutch

Regular Expression for RegexUrlNormalizer to remove jsessionid

Created: 26/Apr/06 12:42 AM   Updated: 22/Sep/08 03:12 PM
Return to search
Component/s: fetcher
Affects Version/s: 0.8
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works urlnormalize_jessionid.patch 2006-04-26 12:43 AM Dennis Kubes 0.6 kB
Environment: Windows XP Media Center 2005, 2 Gigs RAM, 3.0 Ghz Pentium 4 Hyperthreaded, Eclipse 3.2.0
Issue Links:
Incorporates

Resolution Date: 22/Sep/08 03:12 PM


 Description  « Hide
Some URLs are filtered out by the crawl url filter for special characters (by default). One of these is the jsessionid urls such as:

http://www.somesite.com;jsessionid=A8D7D812B5EFD3099F099A760F779E3B?query=string

We want to get rid of the jessionid and keep everything else so that it looks like this:

http://www.somesite.com?query=string

Below is a regular expression for the regex-normalize.xml file used by the RegexUrlNormalizer that sucessfully removes jsessionid strings while leaving the hostname and querystring. I have also attached a patch for the regex-normalize.xml.template file that adds the following expression.

<regex>
<pattern>(.)(;jsessionid=[a-zA-Z0-9]{32})(.)</pattern>
<substitution>$1$3</substitution>
</regex>



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Dennis Kubes added a comment - 26/Apr/06 12:43 AM
Patch file that adds regular expression to remove jsessionid strings from urls to the regex-normalize.xml.template file.

Dennis Kubes made changes - 26/Apr/06 12:44 AM
Field Original Value New Value
Attachment urlnormalize_jessionid.patch [ 12325838 ]
Dennis Kubes made changes - 26/Apr/06 02:56 AM
Link This issue incorporates NUTCH-243 [ NUTCH-243 ]
Stefan Neufeind made changes - 22/May/06 08:13 PM
Link This issue is part of NUTCH-279 [ NUTCH-279 ]
Stefan Neufeind added a comment - 22/May/06 08:48 PM
You might want to have a / right after the .com in the example - but that's not too important here
You can also omit the (.*) at beginning/end of expression as it's not needed for this task

NUTCH-279 includes your patch modified in there.
PS: Thanks for the contribution.


Andrzej Bialecki made changes - 22/Sep/08 03:12 PM
Resolution Duplicate [ 3 ]
Status Open [ 1 ] Closed [ 6 ]
Andrzej Bialecki added a comment - 22/Sep/08 03:12 PM
Duplicate of NUTCH-279 .