lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Kutin (JIRA)" <>
Subject [jira] [Updated] (LUCENE-4959) Incorrect return value from SimpleNaiveBayesClassifier.assignClass
Date Fri, 26 Apr 2013 20:08:16 GMT


Alexey Kutin updated LUCENE-4959:

    Attachment: LUCENE-4959.patch

Replaced BytesRef.clone() with BytesRef.deepCopyOf() to let it hold on to the instance while

Also had to change unit tests to expose the issue first.
> Incorrect return value from SimpleNaiveBayesClassifier.assignClass 
> -------------------------------------------------------------------
>                 Key: LUCENE-4959
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>    Affects Versions: 5.0, 4.2.1
>            Reporter: Alexey Kutin
>            Assignee: Adrien Grand
>              Labels: classification
>         Attachments: LUCENE-4959.patch
> The local copy of BytesRef referenced by foundClass is affected by subsequent
calls as the shared BytesRef.bytes changes. 
> If a term "test" gives a good match and a next term in the terms collection is "classification"
with a lower match score then the return result will be "clas"

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