[Dovecot] wrong search results with fts_solr
I am getting some very weird search results with fts_solr.
- when I do a search for "testin" I get 0 results.
- when I do a search for "testing" i get 44 results.
The problem is that I am expecting only 1 result.
I don't know the solr internal very much, but does anyone have any idea what is going on?
Thanks,
-Joe
Here are the imap commands I used:
3 search text "testin"
- SEARCH 3 OK Search completed (0.028 secs). 3 search text "testing"
- SEARCH 7785 14324 16469 16470 50762 50763 50764 50846 51070 51071 51072 51073 51074 51075 51076 51077 51078 51079 51080 51081 51082 51658 51659 51660 51661 54525 65368 68422 68727 68728 68729 68730 68731 68732 69431 69432 70784 70785 77533 80954 90705 91731 96932 99285 106932 3 OK Search completed (0.032 secs).
Along with the solr logs i see:
May 16, 2012 4:27:39 PM org.apache.solr.core.SolrCore execute INFO: [] webapp=/solr path=/select params={fl=uid,score&sort=uid+asc&fq=%2Bbox:dff09003c7fbb34fad2a000070072a68+%2Buser:"formulaire"&q=(hdr:"testin"+OR+body:"testin")&rows=328754} hits=0 status=0 QTime=2 May 16, 2012 4:27:43 PM org.apache.solr.core.SolrCore execute INFO: [] webapp=/solr path=/select params={fl=uid,score&sort=uid+asc&fq=%2Bbox:dff09003c7fbb34fad2a000070072a68+%2Buser:"formulaire"&q=(hdr:"testing"+OR+body:"testing")&rows=328754} hits=45 status=0 QTime=3
On Wed, 2012-05-16 at 16:39 -0400, Joe Beaubien wrote:
I am getting some very weird search results with fts_solr.
- when I do a search for "testin" I get 0 results.
- when I do a search for "testing" i get 44 results.
The problem is that I am expecting only 1 result.
Solr uses "stemming" for indexing/searching words. After that it searches those stemmed words, it doesn't do prefix searching by default. So:
You don't have any mails with a word "testin" in it.
"testing" probably gets stemmed to "test", and you get a combined result of "test", "testing", "tests" and maybe some other words.
participants (2)
-
Joe Beaubien
-
Timo Sirainen