Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Optimizing Lucene performance

Tags:

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 query again?

like image 355
user40907 Avatar asked Mar 21 '09 00:03

user40907


People also ask

Why is Lucene so fast?

Why is Lucene faster? Lucene is very fast at searching for data because of its inverted index technique. Normally, datasources structure the data as an object or record, which in turn have fields and values.

Does Lucene use btree?

Last I checked, Lucene doesn't use B-trees. It uses a variation on skip lists to implement efficient inverted indices.

What is the Lucene data structure?

Lucene uses a well-known index structure called an inverted index. Quite simply, and probably unsurprisingly, an inverted index is an inside-out arrangement of documents in which terms take center stage. Each term refers to the documents that contain it.


2 Answers

Have you looked at

Lucene Optimization Tip: Reuse Searcher

Advanced Text Indexing with Lucene

Should an index be optimised after incremental indexes in Lucene?

like image 186
Mitch Wheat Avatar answered Oct 04 '22 14:10

Mitch Wheat


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.
like image 39
Shashikant Kore Avatar answered Oct 04 '22 14:10

Shashikant Kore