Optimizing Lucene performance

前端 未结 6 818
耶瑟儿~
耶瑟儿~ 2020-12-07 21:21

What are the various ways of optimizing Lucene performance?

Shall I use caching API to store my lucene search query so that I save on the overhead of building the qu

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-07 21:42

    Quick tips:

    • Keep the size of the index small. Eliminate norms, Term vectors when not needed. Set Store flag for a field only if it a must.
    • Obvious, but oft-repeated mistake. Create only one instance of Searcher and reuse.
    • Keep in the index on fast disks. RAM, if you are paranoid.

提交回复
热议问题