On 10/9/06, Stanislav Jordanov <[EMAIL PROTECTED]> wrote:
Method
static public Query parse(String query, String field, Analyzer analyzer)
in class QueryParser is deprecated in 1.9.1 and the suggestion is: /"Use
an instance of QueryParser and the [EMAIL PROTECTED] #parse(String)} method 
instead."/
My question is: in the context of multi threaded app, is it safe that
distinct threads utilize the same instance of QueryParser for parsing
their queries?

ps. After writing this letter, I incidentally ran into the answer in the
end of the class comment of QueryParser:
/ * <p>Note that QueryParser is <em>not</em> thread-safe.</p>/

So, is this it?

Yes.  A single QueryParser object should not be used from multiple threads.
It's unclear why one would want to do so anyway.

-Yonik
http://incubator.apache.org/solr Solr, the open-source Lucene search server

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to