Thomas den Braber wrote on 5/14/09 2:21 AM:
> HI,
>
> I found a strange behavior when doing an exact search in an metafield.
>
> I have done:
>
> PropertyNamesIgnoreCase persons
> MetaNames persons
>
> I add a value of: M. Jones in persons and do an exact search for
>
> persons="M. Jones" this will find no hits
>
> If I do persons="M Jones" it will also find nothing
> Only persons="Jones" will work
>
> If I add the value M Jones ( without the .) in the persons field,
> then a search for: persons="M Jones" will give hits (even if I search for
> persons="M. Jones")
>
> I use:
>
> WordCharacters abcdefghijklmnopqrstuvwxyz0123456789-_&
>
> IgnoreFirstChar .-_$&
> IgnoreLastChar .-_&
>
> BeginCharacters abcdefghijklmnopqrstuvwxyz0123456789
>
> I would think that the . is just stripped if you add "M. Jones" so you
> could search for persons="M Jones" would give results
>
> It looks like if an . is in the value then an exact search will not work
> anymore
>
> Any clue ?
>
are you running the query from the command line? did you single quote the entire
query to make sure the shell isn't interpreting the double quotes? notice the
example below:
[karpet@pekmac:~/tmp]$ swish-e -w jones
# SWISH format: 2.4.7
# Search words: jones
# Removed stopwords:
err: no results
.
[karpet@pekmac:~/tmp]$ swish-e -w persons=jones
# SWISH format: 2.4.7
# Search words: persons=jones
# Removed stopwords:
# Number of hits: 1
# Search time: 0.000 seconds
# Run time: 0.004 seconds
1000 jones.xml "jones.xml" 42
.
[karpet@pekmac:~/tmp]$ swish-e -w persons="M Jones"
# SWISH format: 2.4.7
# Search words: persons=M Jones
# Removed stopwords:
err: no results
.
[karpet@pekmac:~/tmp]$ swish-e -w 'persons="M Jones"'
# SWISH format: 2.4.7
# Search words: persons="M Jones"
# Removed stopwords:
# Number of hits: 1
# Search time: 0.001 seconds
# Run time: 0.006 seconds
1000 jones.xml "jones.xml" 42
.
[karpet@pekmac:~/tmp]$ swish-e -w 'persons="M. Jones"'
# SWISH format: 2.4.7
# Search words: persons="M. Jones"
# Removed stopwords:
# Number of hits: 1
# Search time: 0.000 seconds
# Run time: 0.009 seconds
1000 jones.xml "jones.xml" 42
.
[karpet@pekmac:~/tmp]$ cat jones.conf
PropertyNamesIgnoreCase persons
MetaNames persons
DefaultContents XML*
WordCharacters abcdefghijklmnopqrstuvwxyz0123456789-_&
IgnoreFirstChar .-_$&
IgnoreLastChar .-_&
BeginCharacters abcdefghijklmnopqrstuvwxyz0123456789
[karpet@pekmac:~/tmp]$ cat jones.xml
<doc>
<persons>M. Jones</persons>
</doc>
[karpet@pekmac:~/tmp]$
--
Peter Karman . http://peknet.com/ . peter(at)not-real.peknet.com
_______________________________________________
Users mailing list
Users@lists.swish-e.org
http://lists.swish-e.org/listinfo/users
Received on Fri May 15 23:23:33 2009