lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luke Francl <luke.fra...@stellent.com>
Subject Re: QueryParser not thread-safe
Date Tue, 23 Aug 2005 17:19:47 GMT
On Tue, 2005-08-23 at 12:01, Miles Barr wrote:
> Using a non-threadsafe object in a threaded environment is fairly
> standard in Java, just wrap it in a synchronized block. 
> 
> If you don't want all threads waiting on one query parser, create a pool
> of them. 

Based on doing the simplest possible thing, I would recommend creating a
new parser for every thread using QueryParser.parse( String, String,
Analyzer) until/unless you determine this is a performance bottleneck.

Regards,
Luke Francl


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


Mime
View raw message