Re: Analyzer sharing

2007-06-22 Thread Jiye Yu
I see. I guess those Filters (e.g. PorterStemFilter) that make up the analyzer are not thread safe or cannot be shared. Thanks for your quick response! Jay Yonik Seeley wrote: On 6/22/07, Jiye Yu <[EMAIL PROTECTED]> wrote: I guess an Analyzer (built in ones such as StandardAnalyzer, POrterSt

Re: Analyzer sharing

2007-06-22 Thread Yonik Seeley
On 6/22/07, Jiye Yu <[EMAIL PROTECTED]> wrote: I guess an Analyzer (built in ones such as StandardAnalyzer, POrterStemAnalyer and etc) is not thread safe. Analyzers *are* thread-safe. Multiple threads can all call analyzer.tokenStream() without any synchronization. -Yonik

Analyzer sharing

2007-06-22 Thread Jiye Yu
Hi, I guess an Analyzer (built in ones such as StandardAnalyzer, POrterStemAnalyer and etc) is not thread safe. But I wonder if it's ok to share the same analyzer object within a thread. For example, if I want to create a PerFieldAnalyzer for 5 fields, can I use the same Analyzer object for a