Some more information: Using the doveadm search command, the domain name is 
included in the user key in the search sent to Solr. IMAP appears to be the odd 
man out here.



----- Original Message -----
From: G H <uothr...@yahoo.com>
To: "dovecot@dovecot.org" <dovecot@dovecot.org>
Cc: 
Sent: Tuesday, August 12, 2014 9:35 AM
Subject: BUG: Solr FTS engine appends domain name to index records

The Solr FTS engine appends domain names to the "user" and "id" fields inside 
Solr when indexing. However, when an IMAP search is performed, the domain name 
is not appended, resulting in 0 results, 100% of the time.


You can reproduce this by setting up dovecot to have user names like "admin", 
"james", etc (as opposed to ad...@example.com). Then import some mail (ie: 
"dovecot-lda -d admin < /tmp/mymail.txt"). Now attempt to search for that mail 
and it will not be returned as a result. You can see in the Solr GUI 
(http://xxxx:8983/solr/) that record is indexed as:
      {
        "uid": 1,
        "box": "7dff0b0d4f84df53f25300003d823887",
        "user": "ad...@example.com",
        "id": "1/7dff0b0d4f84df53f25300003d823887/ad...@example.com",
        "_version_": 1475511406809841700
      }

However, the IMAP search is sent to Solr performed with user:"admin" instead of 
user:"ad...@example.com".

Either the Solr FTS plugin needs to not append the domain name or the search 
does need to do so.

Reply via email to