<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Woops, this time with better formatting.<br>
</p>
<div class="moz-cite-prefix">On 09.02.22 12:21, Patrik Peng wrote:<br>
</div>
<blockquote type="cite"
cite="mid:45382d37-3b7e-3ed5-b5db-1456541a066d@hostpoint.ch">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<p>Hello there</p>
<p>We stumbled upon an user account with Solr FTS, which returned
no search results for any given search query.<br>
Further investigation revealed an issue between indexing mails
and querying the index.<br>
The user name contains upper and lower case characters (eg. <a
class="moz-txt-link-abbreviated moz-txt-link-freetext"
href="mailto:Some.User@domain.net" moz-do-not-send="true">Some.User@domain.net</a>).</p>
<p>When new mail is indexed for this user, the user name used for
Solr's `user` and `id` fields are transformed into lowercase, as
shown in the Solr log:</p>
<div><font face="monospace">webapp=/solr path=/update
params={...}{add=[<a class="moz-txt-link-abbreviated
moz-txt-link-freetext"
href="mailto:8543/426f3b0348d03451a3fb00008ba2b673/some.user@domain.net"
moz-do-not-send="true">8543/426f3b0348d03451a3fb00008ba2b673/some.user@domain.net</a>
(1724281617442144256), ... (162 adds)]} 0 44298</font><br>
</div>
<div><br>
</div>
<div>And can be confirmed by manually querying Solr. The Solr
schema in use performs no transformation for the affected
fields.<br>
</div>
<div>When a search request is performed via IMAP, Dovecot queries
Solr with the original user name:<br>
</div>
<div><br>
</div>
<div><font face="monospace">GET
/solr/dovecot_fts_popimap/select?wt=json&f...&fq=%2Bbox:1a30ec359dce3451b8e600008ba2b673+%2Buser:Some.User@domain.net
HTTP/1.1"</font><br>
</div>
<div><br>
</div>
<div>Which (correctly) returns zero results.<br>
</div>
<div><br>
</div>
<div>To summarize, I suspect dovecot transforms any user name to
lower case while indexing mails, but not when querying for
results.<br>
</div>
<div><br>
Is this a bug, or caused by misconfiguration?<br>
<br>
</div>
<div>Regards<br>
Patrik<span style="color: #d4d4d4;"><br>
</span></div>
</blockquote>
</body>
</html>