Skip to main content.
home | support | download

Back to List Archive

Re: Fixing Swish 2.4.0 To Work on Windows

From: Ahmad, Zeeshan (FMC) <Zeeshan.Ahmad(at)>
Date: Tue Nov 11 2003 - 03:43:53 GMT
A couple of things need to be changed when using swish_filter: 
      use lib qw( ./lib/swish-e/perl );
   your .config file:	
      FileFilter .pdf ./lib/swish-e/ '"%p" "%P"'

Path issue when using swish.cgi. Correct path to use:
      use lib qw( ./perl );

Zeeshan Ahmad,
FMC Computing Services

-----Original Message-----
From: [] On
Behalf Of David L Norris
Sent: Friday, 7 November 2003 6:00 PM
To: Multiple recipients of list
Subject: [SWISH-E] Re: Fixing Swish 2.4.0 To Work on Windows

On Thu, 2003-11-06 at 23:22, Ahmad, Zeeshan (FMC) wrote:
> I was trying to index PDFs with Swish and encountered a bucket load of
> problems. It took a lot of tinkering to get it right. In the process, I
> a few changes (mostly related to paths and directory names with spaces).
> you can't get file-system based PDF indexing right, try the following
> changes. Platform: Win2K

SWISH::Filter is probably a better way to index PDF files and it's the
same method used by the spiders.  SWISH::Filter currently provides PDF
to HTML, Word Doc to Text, Excel to HTML, and ID3 to HTML.  You can also
write your own SWISH::Filter modules and drop them into

You should be able to use this (but see below):
  FileFilter .pdf '"%p" "%P"'

I probably should install the example scripts (,,,, somewhere other than
lib\swish-e by default.  I think Bill made that suggestion at some
point.  I can see how that would be extremely confusing.

> ------------------------------------
> Set correct filter path in configuration file. e.g.
>    FileFilter .pdf ./lib/swish-e/ '"%p"'
> Set correct path to pdf converters in e.g.
>    $ENV{PATH} ='D:/Program Files/SWISH-E4/lib/swish-e;'. $ENV{PATH};

Yes, that's a good workaround.  I'll see if we can get that fixed in the
next release.  We don't seem to be handling FileFilter correctly.  My
intention is that everything in {prefix}\lib\swish-e should be directly
executable using it's base name.

Using my above example it does not work without modifying the PATH:
C:\SWISH-E>swish-e -c cfg -i n:\temp\test.pdf
Indexing Data Source: "File-System"
Indexing "n:\temp\test.pdf"
'' is not recognized as an internal or external command,
operable program or batch file.

Bill, looks like we never fixed FilterOpen() in filter.c, line 298. 
It's not using the new PATH stuff.  It's simply doing a popen().  I
think it needs to be doing a get_env_path_with_libexecdir() beforehand.

 David Norris
  ICQ - 412039
Received on Tue Nov 11 03:53:50 2003