Skip to main content.
home | support | download

Back to List Archive

Re: Fixing Swish 2.4.0 To Work on Windows

From: David L Norris <dave(at)not-real.webaugur.com>
Date: Fri Nov 07 2003 - 07:29:15 GMT
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 made
> a few changes (mostly related to paths and directory names with spaces). If
> 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
lib\swish-e\perl\SWISH\Filters.


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


I probably should install the example scripts (index_hypermail.pl,
_pdf2html.pl, MySQL.pl, file.pl, DirTree.pl) 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/_pdf2html.pl '"%p"'
> 
> Set correct path to pdf converters in _pdf2html.pl. 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"
'swish_filter.pl' 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
  http://www.webaugur.com/dave/
  ICQ - 412039
Received on Fri Nov 7 07:29:58 2003