Re: IndexSearcher and Multiple Threads

2008-01-28 Thread Chris Hostetter
: 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

Re: IndexSearcher and Multiple Threads

2008-01-28 Thread Erick Erickson
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

IndexSearcher and Multiple Threads

2008-01-28 Thread Cam Bazz
Hello, Is IndexSearcher ThreadSafe? I made a simple httpserver using grizzly as described in http://jlorenzen.blogspot.com/2007/06/using-grizzly-to-create-simple-http.html which submit queries to a single instance of indexsearcher and I get some errors (when I query with more then one threads) suc