phpzend-frameworklucenefull-text-searchzend-search-lucene

How to improve Zend Lucene performance?


I am currently struggling to speed up my Zend Lucene index. It contains about 1M documents. In some cases it takes up to 0.4 sec to search through it. It is not acceptable. I wish it could return results within 0.1 sec max.

The documentation does not contain any information about performance issues of the engine except it says the engine is well-scalable. The only thing I have learned is possibility of using optimize() method. This is not enough, though. Thus, I have two questions:

  1. Does order of fields added to each row (document) matter (in terms of performance)?

  2. Are there any additional parameters I could use to possibly speed it up? Perhaps it could be some parameter used for indexing or some server setting (more memory, etc.)


Solution

  • I would suggest moving to real Lucene (or Solr) for better performance.

    Otherwise, try to reduce the number of fields you store and/or index. Maybe run ulimit on your webserver process to free up more memory.