: Is IndexSearcher ThreadSafe? I made a simple httpserver using grizzly as
...
: java.lang.NullPointerException
: at org.apache.lucene.queryParser.QueryParser.jj_scan_token(
...
: This error does not happen if I do searches one at a time.
IndedSearcher is thread safe, QueryPar
The IndexSearcher is thread-safe. The QueryParser is *not*. From the
JavaDocs for QueryParser
Note that QueryParser is *not* thread-safe.
So I'd guess you're using a single QueryParser across multiple
threads. Just use a new one each time, they're not expensive...
Best
Erick
On Jan 28, 200