when to call full optimize function in lucene search?

101 Views Asked by At

I am confused when to call the Full index optimization in Lucene search.

I am using zend_search_lucene for it.

// Open existing index
$index = Zend_Search_Lucene::open('/data/my-index');

// Optimize index.
$index->optimize();

Should I call this function at the time of searching or should I call this after indexing?

0

There are 0 best solutions below