lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrien Grand <>
Subject Re: org.apache.lucene.classification - bug in SimpleNaiveBayesClassifier
Date Wed, 24 Apr 2013 23:22:32 GMT
Hi Alexey,

On Tue, Apr 23, 2013 at 3:28 PM, Alexey Anatolevitch
<> wrote:
> I was trying it with 4.2.1 and SimpleNaiveBayesClassifier seems to have a
> bug - the local copy of BytesRef referenced by foundClass is affected by
> subsequent calls as the shared BytesRef.bytes
> changes... I can provide a test case if that was not clear.
> I believe it's either BytesRef.clone() that needs to create a full copy of
> the underlying array, or a local fix SimpleNaiveBayesClassifier to actually
> copy bytes instead of clone()

Good catch Alexey. If you can open an issue in JIRA and provide a
patch, I'll be happy to review it!


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

View raw message