Skip to main content.
home | support | download

Back to List Archive

Re: Wildcard

From: Peter Karman <peter(at)not-real.peknet.com>
Date: Thu Nov 02 2006 - 22:19:57 GMT
Howard L. Funk scribbled on 11/2/06 3:54 PM:
> In reply to the request for an example,
> 
> go to http://www.nnp.org the files contain both the words master and 
> masters. A search for either of these words gives the correct result.
> A search for sponsor yields one result. A search for sponsors yields one 
> result. A search for sponsor* finds sponsor, sponsors, and sponsorhip.
> 
> However a search for sponsor? which I would expect to find sponsor and 
> sponsors finds only sponsor/
> 

are you using version 2.4.4?

It's difficult to tell from that web example, since there's no way for me to 
tell what words swish-e thinks are in that particular index. Can you index just 
those two files that contain 'sponsor' and 'sponsors' and then test? Easier via 
command line than via the .cgi script.

Here's my quick test. It seems to show that ? matches exactly one character, 
which is what the documentation claims:

[pkarman@alpc:~/tmp]$ cat foo.html
<html>
foo bar
</html>
[pkarman@alpc:~/tmp]$ cat foos.html
<html>
foos ball
</html>

[pkarman@alpc:~/tmp]$ swish-e -w foo
1000 foo.html "foo.html" 23
.
[pkarman@alpc:~/tmp]$ swish-e -w 'foo*'
1000 foos.html "foos.html" 25
1000 foo.html "foo.html" 23
.
[pkarman@alpc:~/tmp]$ swish-e -w 'foo?'
1000 foos.html "foos.html" 25
.
[pkarman@alpc:~/tmp]$ swish-e -w 'foo'
1000 foo.html "foo.html" 23
.
[pkarman@alpc:~/tmp]$ swish-e -w 'foo? or foo'
1000 foos.html "foos.html" 25
1000 foo.html "foo.html" 23
.
[pkarman@alpc:~/tmp]$ swish-e -w 'f?o?'
1000 foos.html "foos.html" 25
.
[pkarman@alpc:~/tmp]$ swish-e -w 'f?o*'
1000 foos.html "foos.html" 25
1000 foo.html "foo.html" 23
.


-- 
Peter Karman  .  http://peknet.com/  .  peter(at)not-real.peknet.com
Received on Thu Nov 2 14:19:58 2006