slusarz / dovecot-fts-flatcurve

Dovecot FTS Flatcurve plugin (Xapian)
https://slusarz.github.io/dovecot-fts-flatcurve/
GNU Lesser General Public License v2.1
40 stars 8 forks source link

Excessively long string sent to xapian to index #44

Closed slusarz closed 1 year ago

slusarz commented 1 year ago

Report of this error:

Could not write message data: uid=####; InvalidArgumentError: Term too long (> 245): //foo.example.com/?xtl=REDACTED&xi=foo@example.com
slusarz commented 1 year ago

Cannot reproduce.

With new testcase, indexing works fine:

Oct 06 23:51:57 indexer-worker(user)<18><xCgB7RQHdo9/AAAB:9+JvEZ2dIGUSAAAA5okPIw>: Debug: fts-flatcurve(imaptest): Opened DB (RW; current.1696636317293297) messages=0 version=1
Oct 06 23:51:57 indexer-worker(user)<18><xCgB7RQHdo9/AAAB:9+JvEZ2dIGUSAAAA5okPIw>: Debug: fts-flatcurve(imaptest): Indexing uid=1
Oct 06 23:51:57 indexer-worker(user)<18><xCgB7RQHdo9/AAAB:9+JvEZ2dIGUSAAAA5okPIw>: Debug: fts-flatcurve(imaptest): Committed 1 changes to DB (RW; current.1696636317293297) in 0.000 secs
Oct 06 23:51:57 indexer-worker(user)<18><xCgB7RQHdo9/AAAB:9+JvEZ2dIGUSAAAA5okPIw>: Debug: fts-flatcurve: Update transaction completed in 0.035 secs
Oct 06 23:51:57 indexer-worker(user)<18><xCgB7RQHdo9/AAAB:9+JvEZ2dIGUSAAAA5okPIw>: Debug: Mailbox imaptest: Indexed 1 messages (UIDs 1..1)

Verified that string is being truncated (to 30 - the default value of fts_flatcurve_max_term_size):

/ # doveadm fts-flatcurve dump -u user imaptest
[... snip ...]
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa count=1

Without additional information from somebody able to reproduce, there doesn't appear to be anything wrong. Closing.