Re: Error: fts_solr: received invalid uid
Here is what solr sends to dovecot, the offending uid in this exmaple is '21' { "responseHeader":{ "status":0, "QTime":1, "params":{ "q":"body:Zeitserver"}}, "response":{"numFound":1,"start":0,"numFoundExact":true,"docs":[ { "uid":[21], "box":["2e60f3054059c95fbf580600eb1947e0"], "user":["oliver.krone@snoog.ch"], "id":"21/2e60f3054059c95fbf580600eb1947e0/oliver.krone@snoog.ch", "body":[" ... "], "hdr":[" ... "], "from":["..."], "subject":["..."], "to":["..."], "_version_":1720682332306800640}] }}
Oliver
I'm using dovecot 2.3.13,? solr 8.x. and roundcube 1.5.1. However when I do a search I get the the Error: fts_solr: received invalid uid, search results are ok.
Thanks Presumably one of the uid returned from solr could not be decoded (i.e. converted to an int). The offending uid should have been printed as part of the message. If you need to get more info you could investigate what is being returned by solr running the exact same query from a browser if you're able to retrieve it from the solr log.
Alternatively you could set rawlog_dir in the fts_solr dovecot settings and then look at what is being sent back from solr in the .in file that is logged.
https://doc.dovecot.org/settings/plugin/fts-solr-plugin/?highlight=fts%20dov...
John
On 02/01/2022 12:13, oliver.krone@snoog.ch wrote:
Here is what solr sends to dovecot, the offending uid in this exmaple is '21' { "responseHeader":{ "status":0, "QTime":1, "params":{ "q":"body:Zeitserver"}}, "response":{"numFound":1,"start":0,"numFoundExact":true,"docs":[ { "uid":[21], "box":["2e60f3054059c95fbf580600eb1947e0"], "user":["oliver.krone@snoog.ch"], "id":"21/2e60f3054059c95fbf580600eb1947e0/oliver.krone@snoog.ch", "body":[" ... "], "hdr":[" ... "], "from":["..."], "subject":["..."], "to":["..."], "_version_":1720682332306800640}] }}
Oliver
Hi Oliver
unless I'm missing something that doesn't look like the type of query dovecot launches - dovecot sends various parameters including the request for xml results. The thing that looks odd to me is that the results fields should be single values not arrays enclosed in [], ie I would have expected
"uid":21,
instead of
"uid":[21],
I'd be interested to see the equivalent xml output produced by running a query that dovecot sends.
John
On 1/2/22 3:08 PM, John Fawcett wrote:
unless I'm missing something that doesn't look like the type of query dovecot launches - dovecot sends various parameters including the request for xml results. The thing that looks odd to me is that the results fields should be single values not arrays enclosed in [], ie I would have expected "uid":21,
instead of
"uid":[21],
I'd be interested to see the equivalent xml output produced by running a query that dovecot sends.
This Solr instance is not configured properly for dovecot. Most of the fields are configured as multiValued (which is why you see an array rather than a single value), and the response is JSON. A Solr instance that is properly configured for dovecot would return XML, not JSON.
You're going to want to provide a proper solrconfig.xml and managed-schema file, restart Solr or reload the core for dovecot, and do a full reindex. At the following URL, you can find the shell script that I use to do a full reindex:
At the following URL are links to the solrconfig.xml and schema that are appropriate for dovecot. These instructions say to name the schema file "schema.xml" ... this will work, as long as Solr has read-write access to the conf directory so it can rename the file to "managed-schema". If it doesn't, then you should name the file "managed-schema" yourself.
https://doc.dovecot.org/configuration_manual/fts/solr/
Thanks, Shawn
participants (3)
-
John Fawcett
-
oliver.krone@snoog.ch
-
Shawn Heisey