Skip to main content.
home | support | download

Back to List Archive

Re: Search problems with () and closing periods

From: Bill Moseley <moseley(at)>
Date: Thu Nov 11 1999 - 14:29:23 GMT
At 04:28 AM 11/11/99 -0800, Richard Morte wrote:
>I have been struggling for several days now to try and configure swish-e
>to accept (and _ignore_) a closing period (if one is appended to a
>search word). If a user enters a closing period, then no search results
>are ever returned.

You don't have a period in IgnoreLastChar, so the period is going to be
indexed as part of the word.

>IgnoreLastChar )
IgnoreLastChar .

(I don't see any reason to place ( and ) in the Wordcharacters list at all.
 For one thing they are special characters used to control the order of
evaluation of the search expression so they shouldn't be in indexed words.)

Swish uses wordcharacters and friends while indexing, not when searching.
This is a problem in the program's logic, IMO.  I use perl code to convert
the search into something swish can use by reading the .conf file and
applying the rules to the search string.  Search the list archive for
"Making Swish search like it indexes" for more info.

>Is it simply the case that the directives in config.h (corresponding to
>the above user.config directives) have to be specified at compile time
>before any of the user.config directives have any effect? If so, the
>solution is simple - I have to compile my own binary!

The settings you specify in the -c config file while indexing will override
the compiled in settings.

>Any pointers, advice or confirmation will be very much appreciated.

It really helps to index a single file of words and then use the -D option
to see how words are indexed.  It is then helpful to add a printf to
search.c to see exactly what words swish using to search the index.  This
will help you understand why swish is or is not finding a word.

Bill Moseley
Received on Thu Nov 11 06:36:20 1999