Skip to main content.
home | support | download

Back to List Archive

[swish-e] Swish-E and mailman integration

From: Scott Race <scott(at)>
Date: Tue Aug 17 2010 - 23:42:54 GMT
I am looking for a good search module to integrate with mailman - this company was previously using htdig which worked ok, but the project has been dead for some time now I see.

I also see swish-e appears to integrate with mailman quite well and I'm excited to get it going.

I have a new server with a few test lists, and trying to integrate swish-e into my archives.
One requirement I have is that swish-e will only search the indexes for the current list, and not all my lists (I have public and private lists).  It seems like my config will create one big index file of all my lists.

I have followed the steps here but get stuck with server side <!--# include --> part, my server does not render it:

Working with the index.html in my archive, I can include the HTML and get a search to come up, but the links to the posts have the /mailman/ directory in the URL before the pipermail/ part, so the links fail.

So - main question - following the setup link above, should this setup search only the current list's archives?

And if so - any hints on getting the Server Side include to work?  

Thanks in advance!!

Here are my conf files: (RHEL5)

from /etc/httpd/conf/http.conf

ScriptAlias /mailman/   /usr/local/mailman/cgi-bin/
Alias /pipermail/       /usr/local/mailman/archives/public/
Servername      lists2

<Directory "/usr/local/mailmain/cgi-bin">
    AllowOverride None
    Options +Includes +ExecCGI
    Order allow,deny
    Allow from all

<Directory "/usr/local/mailman/archives">
   Options +Includes +ExecCGI
   Order allow,deny
   Allow from all

AddHandler cgi-script .cgi

#AddType text/html .html
#AddHandler server-parsed .html

AddType text/html .shtml
AddOutputFilter INCLUDES .shtml


return {
    title        => 'Search mailing lists',
    swish_binary => '/usr/local/bin/swish-e',
    swish_index  => '/var/swish/lists.index',

# I wanted to hide some fields I didn't use - compare it with the values in swish.cgi.
# Default values are commented out.

#   secondary_sort  => [qw/swishlastmodified desc/],
    secondary_sort  => [qw/swishtitle/],
#   sorts           => [qw/swishrank swishlastmodified swishtitle swishdocpath/],
    sorts           => [qw/swishrank swishtitle swishdocsize/],
#   metanames       => [qw/ swishdefault swishtitle swishdocpath /],
    metanames       => [qw/ swishdefault swishtitle /],
#   display_props   => [qw/swishlastmodified swishdocsize swishdocpath/],
    display_props   => [qw/swishdocsize/],

# Index file - this is what Swish will create
IndexFile /var/swish/lists.index

# Root of our Mailman archives - everything under here will be indexed
IndexDir /usr/local/mailman/archives/public

# We want to index .html files only
IndexOnly .html

# Don't index summary pages: author.html, date.html etc.
FileRules filename is (author\.html|date\.html|index\.html|subject\.html|thread\.html)

# Replace local (physical) path with the web-accessible path
ReplaceRules replace "/usr/local/mailman/archives/public" "pipermail/"

# Store description in search results
IndexContents HTML .html
StoreDescription HTML <pre> 200000

# Look at the title, too
MetaNames swishtitle

Users mailing list
Received on Tue Aug 17 19:43:17 2010