Does the Zend lucene search engine work with just Zend Optimizer?

218 views Asked by At

I got it working locally but had to install the whole Zend framework, I am about to try to get this working on my unix server which has Zend Optimizer. I did php -m to check and was wondering if I can install Zend_Search_Lucene with Zend Optimizer or do I need the whole Zend framework?

1

There are 1 answers

0
drew010 On BEST ANSWER

Zend Optimizer and Zend Framework are completely unrelated products. Zend Optimizer is what allows PHP applications encoded with Zend Guard to run. It is similar to xCache or eAccellerator in that Zend Optimizer runs PHP source files that have been compiled to byte code. Optimizer has no knowledge or pre-built in code for Zend Framework.

If you want to use only Zend_Search_Lucene, you don't really need the whole Zend Framework, just the Zend_Search_Lucene classes and any of its dependencies.

I did a check and it looks like the only files you need are Zend/Search and all of its files and subdirectories, and Zend/Exception.php. Zend_Search_Lucene doesn't depend on or use any other Zend Framework code.

So to save yourself from having to have the whole ZF library, you can just download the minimal package, and take Zend/Search/* and Zend/Exception.php and put them in a location that is in your include_path. You should keep the directory structure so that you have the folder called Zend which contains Exception.php and the directory Search. The folder that has the Zend directory should be in your include_path and you can use Zend Lucene without the rest of the library.

Hope that helps.