title: Need to know pros and cons of using RAMDirectory
body: <p>I need to improve performance of my Lucene search query.
  Can I use RAMDirectory?Does it optimize performance?Is there any index size limit for this?
  I would appreciate if someone could list pros and cons of using a RAMDirectory.</p>
  
  <p>Thanks.</p>