Re: Swish++ setup problem


Subject: Re: Swish++ setup problem
From: Iain Stevenson (iain@iainstevenson.com)
Date: Fri Mar 15 2002 - 13:15:04 MST


Paul,

Thanks very much for your reply. I've implemented your suggestion for
apropos and that works fine. Swish++ certainly works very quickly. Now to
configure it a little more extensively.

I think the central point of confusion for me was that many Unix
daemons/programs are automatically configured to read all config
information from /etc - so having to specify the location of the config
file is contrary to my normal expectation. I suspect that a clearer
statement that swish++ does not default to reading swish++.conf from the
driectory where it is installed would help.

  Iain

--On Thursday, March 14, 2002 5:07 pm -0800 "Paul J. Lucas"
<pauljlucas@mac.com> wrote:

> 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 : Fri Mar 15 2002 - 13:30:11 MST