List Info

Thread: Created: (NUTCH-255) Regular Expression for RegexUrlNormalizer to remove jsessionid




Created: (NUTCH-255) Regular Expression for RegexUrlNormalizer to remove jsessionid
user name
2006-04-25 17:44:10
Regular Expression for RegexUrlNormalizer to remove
jsessionid
------------------------------------------------------------
--

         Key: NUTCH-255
         URL: http:/
/issues.apache.org/jira/browse/NUTCH-255
     Project: Nutch
        Type: Improvement

  Components: fetcher  
    Versions: 0.8-dev    
 Environment: Windows XP Media Center 2005, 2 Gigs RAM, 3.0
Ghz Pentium 4 Hyperthreaded, Eclipse 3.2.0
    Reporter: Dennis Kubes
    Priority: Trivial
 Attachments: urlnormalize_jessionid.patch

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;jsession
id=A8D7D812B5EFD3099F099A760F779E3B?query=string

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

http://www.somes
ite.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])(.*)</pat
tern>
  <substitution>$1$3</substitution>
</regex>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the
administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

-
For more information on JIRA, see:
   http://www.atl
assian.com/software/jira

Commented: (NUTCH-255) Regular Expression for RegexUrlNormalizer to remove jsessionid
user name
2006-05-22 13:48:30
    [ http://issues.apache.org/jira/browse
/NUTCH-255?page=comments#action_12412777 ] 

Stefan Neufeind commented on NUTCH-255:
---------------------------------------

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.

> Regular Expression for RegexUrlNormalizer to remove
jsessionid
>
------------------------------------------------------------
--
>
>          Key: NUTCH-255
>          URL: http:/
/issues.apache.org/jira/browse/NUTCH-255
>      Project: Nutch
>         Type: Improvement

>   Components: fetcher
>     Versions: 0.8-dev
>  Environment: Windows XP Media Center 2005, 2 Gigs RAM,
3.0 Ghz Pentium 4 Hyperthreaded, Eclipse 3.2.0
>     Reporter: Dennis Kubes
>     Priority: Trivial
>  Attachments: urlnormalize_jessionid.patch
>
> 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;jsession
id=A8D7D812B5EFD3099F099A760F779E3B?query=string
> We want to get rid of the jessionid and keep everything
else so that it looks like this:
> http://www.somes
ite.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])(.*)</pat
tern>
>   <substitution>$1$3</substitution>
> </regex>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the
administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

-
For more information on JIRA, see:
   http://www.atl
assian.com/software/jira

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )