lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <>
Subject Re: Thread safety of QueryParser
Date Tue, 26 Aug 2003 16:57:44 GMT
Luke Francl wrote:
> According to the jGuru FAQ, QueryParser is not thread safe:
> However, this information is several years old. Is this still true?
> The answer to the question suggests using a new parser for every thread,
> but the QueryParser.parse(String query,String field,Analyzer analyzer) 
> method is static

This method constructs a new query parser each time it is called, so it 
is thread safe.

 > and I don't see any way to set the default field on an
> instance of the QueryParser.

> Is that what the "f" parameter of the QueryParser(String f, Analyzer a)
> constrcutor is for?



View raw message