Skip to main content.
home | support | download

Back to List Archive

[swish-e] Using ExtractPath to Exclude Some Subdirectory from Search Result

From: Ronny Rahardjo <rrahardjo(at)>
Date: Thu Sep 17 2009 - 07:09:13 GMT
Hi All,

I am new to swish-e. It has been installed and running on our production
environment. We are trying to exclude some of the subdirectory file from the
search result.

Currently, the search result can be:

sometime also, it can be: (as you noticed, it has extra '/')

My question is how to eliminate searching the tab=1 subdirectory? We just
need to search for tech or news, but not tab=1. Also, do you know what my
cause the extra '/'.

I learned that we can use EXTRACTPATH to do this, but I always get HTTP 500
Internal Server error everytime I modified the swish.conf file to include
the EXTRACTPATH script.

FYI, I just put EXTRACTPATH script on the swish.conf file. Let me know if I
should put in different file as well. Here is my code in swish.conf.

# On metagroups, I added exclusion metaname
meta_groups => {
            all =>  [qw/swishdefault swishtitle swishdocpath exclusion/],

# On metanames, I added exclusion
metanames       => [qw/ swishdefault exclusion/],

# On Xselect, I added metaname: exclusion. Then the following is my
Xselect_by_meta  => {
            #method      => 'radio_group',  # pick: radio_group, popup_menu,
or checkbox_group
            method      => 'checkbox_group',
            #method      => 'popup_menu',
            columns     => 3,
            metaname    => 'exclusion',     # Can't be a metaname used
            values      => [qw/misc mod vhosts other no/],
            labels  => {
                misc    => 'General Apache docs',
                mod     => 'Apache Modules',
                vhosts  => 'Virtual hosts',
  no  => 'Exclude',
            description => 'Limit search to these areas: ',

# Basically now I just want to search in particular sub directory: news,
tech, etc.
ExtractPath forum regex !^.*/([^/]+)/.*$!$1!

Let me know if you need more information. Thanks.

Users mailing list
Received on Thu Sep 17 03:09:17 2009