lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Wettin <karl.wet...@gmail.com>
Subject Re: Token implementation
Date Tue, 15 Jul 2008 09:59:27 GMT

15 jul 2008 kl. 11.25 skrev Hiroaki Kawai:

> DM Smith <dmsmith555@gmail.com> wrote:
>> In core and contrib, there are times where more than one token is  
>> used
>> at a time. In a few places they are put into collections.
>>
>> So a singleton wouldn't work.
>
> I'd suggest a factory method to get a thread local singleton.
> If one want to new a token, it may be possible, but it is not
> encouraged to do so.
> If there is more than one token, that is not good because
> we are focusing on reducing new object. Such code might be
> refactored to be more simple.

Some token streams require input and output buffers: shingles,  
synonyms, et c.


              karl



---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message