简体   繁体   English

Zend lucene搜索引擎仅可与Zend Optimizer一起使用吗?

[英]Does the Zend lucene search engine work with just Zend Optimizer?

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. 我让它在本地工作,但必须安装整个Zend框架,我将尝试在具有Zend Optimizer的Unix服务器上使其工作。 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? 我做了php -m检查,想知道是否可以使用Zend Optimizer安装Zend_Search_Lucene还是需要整个Zend框架?

Zend Optimizer and Zend Framework are completely unrelated products. Zend Optimizer和Zend Framework是完全无关的产品。 Zend Optimizer is what allows PHP applications encoded with Zend Guard to run. Zend Optimizer允许运行使用Zend Guard编码的PHP应用程序。 It is similar to xCache or eAccellerator in that Zend Optimizer runs PHP source files that have been compiled to byte code. 它与xCache或eAccellerator相似,因为Zend Optimizer运行已编译为字节码的PHP源文件。 Optimizer has no knowledge or pre-built in code for Zend Framework. Optimizer不了解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. 如果只想使用Zend_Search_Lucene,则实际上并不需要整个Zend Framework,只需要Zend_Search_Lucene类及其任何依赖项。

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及其所有文件和子目录,以及Zend/Exception.php Zend_Search_Lucene doesn't depend on or use any other Zend Framework code. Zend_Search_Lucene不依赖或使用任何其他Zend Framework代码。

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. 因此,为了避免拥有完整的ZF库,您只需下载最小的软件包,然后将Zend / Search / *和Zend / Exception.php放在您的include_path中。 You should keep the directory structure so that you have the folder called Zend which contains Exception.php and the directory Search. 您应该保留目录结构,以便拥有名为Zend的文件夹,其中包含Exception.php和目录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. 包含Zend目录的文件夹应该位于include_path中,并且无需使用库的其余部分即可使用Zend Lucene。

Hope that helps. 希望能有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM