Skip to main content.
home | support | download

Back to List Archive

Re: Phrase search

From: SRE <eckert(at)>
Date: Wed Apr 05 2000 - 11:39:51 GMT
At 12:42 AM 4/4/00 -0700, Jose Manuel Ruiz wrote:
>2- Searching 'Joe and Mary' It is not posible because and
>is a reserved word. I think using "<and>", "<or>", "<not>"
>will make things easier but this is major change for all
>the cgi programs working up to day.

Good CGI scripts will check the swish version and adapt
(or refuse to run if they don't know about the current version).
I love forward compatibility, but in this case you either need
a way to bypass the stop word OR a way to index it anyway.

Option 1: parse the search phrase, find out if it includes
a stop word, and match if ANY word is where the search phrase
had a stop word. For instance, "Joe and Mary" would match
"Joe kissed Mary" but would NOT match "Joe slowly kissed Mary".
This could be done strictly with word positions, where you
ignore the word and increment the word counter if the phrase
contains a stop word. Of course, matching "Joe and not Mary"
would have to count two stop word skips, etc.

Option 2: don't have any stop words if you are indexing for
phrase matches. I think this is unworkable, but it's an option.

>I think it will not be difficult to add a "near" operator. 
>I mean, searching for a word wich is as least n positions far
>from the other. Could it be interesting?

Absolutely! Especially since the CGI script could define
what "near" means in terms of max-number-of-words-between.


mailto:eckert(at) |
Info on peak climbing email lists

I just forgot my whole philosophy of life...
Someone tell me what to put here, please!
Received on Wed Apr 5 07:41:45 2000