3

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.)

halfer
  • 19,824
  • 17
  • 99
  • 186
Jacek Francuz
  • 2,420
  • 8
  • 45
  • 61

1 Answers1

5

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.

Ansari
  • 8,168
  • 2
  • 23
  • 34
  • What do you mean by 'real Lucene'? Its Java version? I think Zend Lucene is just the same code but rewritten in php. – Jacek Francuz May 12 '12 at 20:58
  • 3
    Yes but that runs as a daemon/server. Things are stored in-memory. Translated code probably won't run as fast as original code. – Ansari May 12 '12 at 21:04