[Dovecot] fts squat non-english search for 2 words

Timo Sirainen tss at iki.fi
Wed Dec 9 22:45:03 EET 2009


On Thu, 2009-11-26 at 00:00 +0700, vuser1 at test123.ru wrote:
> 
> Timo Sirainen <tss at iki.fi>:
> 
> > On Sun, 2009-11-22 at 20:35 +0700, vuser1 at test123.ru wrote:
> >> Timo, thank you for answer. Meanwhile I was trying to setup
> >> horde+dovecot+search. Next step was dovecot 1.2.4 + solr 1.4. It
> >> works! Now it can find 2 non-latin words.
> >> 1) I cannot search by substrings - neither "plane" nor "plane*" does
> >> find "planet"
> >
> > Try if attached patch helps?
> >
> Quick answer is "no" 8)). Now the story.  
> 
> I debugged and realized that patched plugin generates - for search "xxx yyy":
> q=body:"XXX YYY*"

With the patch I was trying to make it do:

q=body:XXX\ YYY*

And actually looks like I wasn't adding \ before the space at all. And
I'm not even sure if you could have escaped space like that..

> It should be:  
> 
> q=body:XXX* +body:YYY*  

That would be different. Doing SEARCH TEXT XXX TEXT YYY should produce
that, but SEARCH TEXT "XXX YYY" should produce what I mentioned above.

> (not q=body:"XXX*" +body:"YYY*" - quotation does matter)  

I know, that's why I thought my patch removed the quotes..

> But this does not work as expected. Prefix searches (with asterisk) are case-sensitive. I googled around and found this post - http://michaelkimsal.com/blog/solr-case-sensitivty/comment-page-1/#comment-78198 . It is old - 2007, but it looks SOLR is still case-sensitive for *. Because of dovecot capitalizes query (and this is right, I think), the search will never find a thing.  

Doesn't Dovecot also capitalize all the text that goes into Solr? If
not, perhaps it should and that would be the solution.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20091209/ae8abd2c/attachment.bin 


More information about the dovecot mailing list