On 05/01/2012 05:23 PM, David Smiley (@MITRE.org) wrote:
> I am reviewing Apache Lucene's use of Commons-Codec phonetic Encoders for
> thread-safety. Unfortunately, there is barely any mention about
> thread-safety in the javadocs. I think that's a real problem. I noticed
> this old JIRA issue which touches on some of the related aspects of this:
> https://issues.apache.org/jira/browse/CODEC-55
>
> I think the only safe thing for me to do is assume these Encoders are not
> thread-safe.
Hi David,
unluckily not all of the encoders are thread-safe atm:
codec | thread-safe | comment
-----------------------------------
Metaphone | N | code-length may be changed
DoubleMetaphone | N | code-length may be changed
Nysiis | Y |
Soundex | N | maxLength may be changed
RefinedSoundex | Y |
ColognePhonetic | Y |
Caverphone1 | Y |
Caverphone2 | Y |
BeiderMorseEnc /| Y | not 100% sure, but no members are
PhoneticEngine | | changed when encoding and no setters
exist
We should add this information to the javadoc and make all codecs
thread-safe imho.
Best regards,
Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]