lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <>
Subject [jira] [Updated] (LUCENE-4534) WFST/AnalyzingSuggest don't handle keys containing 0 bytes correctly
Date Mon, 05 Nov 2012 15:18:11 GMT


Michael McCandless updated LUCENE-4534:

    Attachment: LUCENE-4534.patch

Patch w/ fix.

Basically, instead of relying on sorting a single "packed" byte[], I decode each byte[] into
its parts (key/weight/analyzed form) and do the comparison "directly".  This is cleaner because
we no longer need to rely on separators that then cause 0 bytes to not work...

> WFST/AnalyzingSuggest don't handle keys containing 0 bytes correctly
> --------------------------------------------------------------------
>                 Key: LUCENE-4534
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 4.1, 5.0
>         Attachments: LUCENE-4534.patch, LUCENE-4534.patch
> While binary terms w/ 0 bytes are rare, they are "allowed" but will cause exceptions
with at least WFST/AnalyzingSuggester.
> I think to fix this we should pass custom Comparator to the offline sorter that decodes
each BytesRef key and does the actual comparison we want, instead of using separator and relying
on BytesRef.compareTo.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message