Hello, I've recently stumbled upon an error in fts-solr plugin. Dovecot sends "rows" parameter to solr when someone is searching in mailbox, but value of rows can be bigger than int in java. If I understand correctly, rows is equal to the last message id on current imap folder. I have mailbox where last uid value is 2206267083 and when I tried to search in this mailbox I got error 400 - Bad Request. On a Solr side I got an error: java.lang.NumberFormatException: For input string: "2206267083" NumberFormat expect an int which max value is 2147483647. Quick test reviles that rows parameter isn't required for correct response from solr. I think that dovecot should check if the value of rows is a correct int, and if not, just skip this argument. Dovecot version: 2.3.11.3 (502c39af9) Solr version: 8.7.0 ------------------ ?ukasz Szczepa?ski +48 58 3509284 www.webd.pl [1] Globtel Internet Links: ------ [1] http://www.webd.pl -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20210402/051aa345/attachment.html>
On 4/2/2021 7:11 AM, ?ukasz Szczepa?ski wrote:> On a Solr side I got an error: > java.lang.NumberFormatException: For input string: "2206267083" > NumberFormat expect an int which max value is 2147483647. > > Quick test reviles that rows parameter isn't required for correct > response from solr. > I think that dovecot should check if the value of rows is a correct int, > and if not, just skip this argument.That error comes from Solr. You can fix it on the Solr side by changing the type on the field from int to long in the schema. When I look at the provided example schema for fts_solr, I do not even see a definition for an "int" type, so if you have one, it's wrong. https://raw.githubusercontent.com/dovecot/core/master/doc/solr-schema-7.7.0.xml Thanks, Shawn