title: Lucene QueryParser in multiple threads: synchronize or construct new each time?
body: <p>I have a web application where users submit queries to a Lucene index.  The queries 
  are parsed by a Lucene
  <a href="http://lucene.apache.org/java/3_0_3/api/contrib-surround/org/apache/lucene/queryParser/surround/parser/QueryParser.html" rel="noreferrer"><code>QueryParser</code></a>.  I learned the hard way that <code>QueryParser</code> is not thread-safe.</p>
  
  <p>Is it better to use a single <code>QueryParser</code> instance, and synchronize on calls to its <code>parse()</code> method?  Or is it better to construct a new instance for each query?  (Or would I be better served by a pool of <code>QueryParser</code>s?)</p>
  
  <p>I know that in general questions like this depend on the particulars and require profiling, but maybe someone out there can say definitively "<code>QueryParser</code>s are extremely inexpensive/expensive to construct"?</p>