Subject: Re: Swish++ setup problem
From: Paul J. Lucas (pauljlucas@mac.com)
Date: Thu Mar 14 2002 - 18:07:13 MST
On Fri, 15 Mar 2002, Iain Stevenson wrote:
> I edited the makefile appropriately and everything seems to install in the
> right place. I edited the index location into swish++.conf and created an
> index file for test purposes. When I type eg "search help" I get the error
> "search: error: could not read index from "swish++.index" - which gives
> the impression that it's not finding the index in /var/tmp
Right. search(1) only looks in the current directory unless
otherwise specified via either -i, --index-file, or IndexFile
inside a config file. This is stated in the manual page.
> If the index file is manually specified to search then files are found -
> although clearly having to specify the index file for every search doesn't
> seem quite right given that it is specified in swish++.conf
search(1), just as with the index file, only looks in the
current directory for swish++.conf unless otherwise specified
via either -c or --config-file. This is also stated in the
manual page.
search(1), unlike man(1), isn't meant to search just a single
document repository (like manual pages). Having search(1) use
a system-wide config file *by* *default* isn't the right thing
to do. That's why it doesn't look in other directories,
including /etc.
If you want to replace apropos(1), you should make a simple
wrapper script around search(1):
$ cd /usr/bin
$ mv apropos apropos.orig
$ vi apropos
#! /bin/sh
# SWISH++ apropos(1) replacement
exec search -c /path/to/swish++.conf $*
By the way, a good swish++.conf file for indexing man pages is:
ExcludeFile [tT]cl* Tk*
IncludeFile man *.[12345678n]
IncludeFile man *.[12345678][a-z]
FilterFile *.bz2 bunzip2 -c %f > @/tmp/%B
FilterFile *.gz gunzip -c %f > @/tmp/%B
FollowLinks yes
TitleLines 150
Verbosity 2
(I personally have no interest in Tcl/Tk man pages so I
excluded them.)
Also, you don't need to run search(1) as a daemon for an
apropos replacement. You only run it as a daemon to be a
search server on a high-traffic machine.
- Paul
This archive was generated by hypermail 2a24 : Thu Mar 14 2002 - 18:21:43 MST