Re: Questions about lucene TokenStream

2012-11-04 Thread lukai
thanks, Uwe. I missed it. On Sun, Nov 4, 2012 at 3:04 PM, Uwe Schindler wrote: > As explained in my first eMail, the class of the implementation is cached, > not the instance. The factory returns a new instance of the cached class. > > Uwe > > > > lukai schrieb: > > >Hi, thanks for the reply. C

Re: Questions about lucene TokenStream

2012-11-04 Thread Uwe Schindler
As explained in my first eMail, the class of the implementation is cached, not the instance. The factory returns a new instance of the cached class. Uwe lukai schrieb: >Hi, thanks for the reply. Could you elaborate "The AttributeFactory >creates >a new one for every new TokenStream instance.

Re: Questions about lucene TokenStream

2012-11-04 Thread lukai
Hi, thanks for the reply. Could you elaborate "The AttributeFactory creates a new one for every new TokenStream instance." ? because i only find the implementation like this: private static Class getClassForInterface(Class attClass) { final WeakReference> ref = attClassImplMap.get(attCla

RE: Questions about lucene TokenStream

2012-11-04 Thread Uwe Schindler
Hi, > Hmmm, the reason i asked this question is regarding to implementation of : > > CharTermAttribute. > > > It seems tokenizer will set token read from reader into it, and the following > tokenstream can also get this instance. My concern is in a multi-thread > envioment. another thread can

Re: Questions about lucene TokenStream

2012-11-04 Thread lukai
Hmmm, the reason i asked this question is regarding to implementation of : CharTermAttribute. It seems tokenizer will set token read from reader into it, and the following tokenstream can also get this instance. My concern is in a multi-thread envioment. another thread can also change the conte

RE: Questions about lucene TokenStream

2012-11-04 Thread Uwe Schindler
Hi, > I have two confused questions regarding Lucene implementation, hope > someone can give me some clues. > > 1. It's about the AttributeSource/AttributeSourceImpl implemenation. > Seems like the default instance was kept as "static" > in DefaultAttributeFactory. But we get these instances i