I am using the Java-based Nutch web-search software. In order to prevent duplicate (url) results from being returned in my search query results, I am trying to remove (a.k.a. normalize) the expressions of 'jsessionid' from the urls being indexed when running the Nutch crawler to index my intranet. However my modifications to $NUTCH_HOME/conf/regex-normalize.xml (prior to running my crawl) do not seem to be having any effect.
How can I ensure that my regex-normalize.xml configuration is being engaged for my crawl? and,
What regular expression will successfully remove/normalize expressions of 'jsessionid' from the url during the crawl/indexing?
The following is the contents of my current regex-normalize.xml:
<?xml version="1.0"?>
<regex-normalize>
<regex>
<pattern>(.*);jsessionid=(.*)$</pattern>
<substitution>$1</substitution>
</regex>
<regex>
<pattern>(.*);jsessionid=(.*)(\&|\&amp;)</pattern>
<substitution>$1$3</substitution>
</regex>
<regex>
<pattern>;jsessionid=(.*)</pattern>
<substitution></substitution>
</regex>
</regex-normalize>
Here is the command that I am issuing to run my (test) 'crawl':
bin/nutch crawl urls -dir /tmp/test/crawl_test -depth 3 -topN 500