Zend_Search_Lucene 与 SOLR [英] Zend_Search_Lucene vs SOLR

查看:28
本文介绍了Zend_Search_Lucene 与 SOLR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近偶然发现了 Lucene 项目的 Zend Lucene 端口.我对 SOLR 有一点经验,所以我想知道它们两个之间有什么区别,尤其是在性能和​​安装方面.

I have recenlty stumbled into Zend Lucene port of Lucene project. I have a little bit experience with SOLR so I would like to know what is the difference between two of them especially from performance and installation side.

据我所知,SOLR 需要在 Web 托管中运行 Tomcat serverlet 才能工作,那么 Zend Lucene 库呢?

As much as I know SOLR requires Tomcat serverlet running in web hosting in order to work, what about Zend Lucene library?

我也有点困惑在Lucene之上实现"是什么意思?

I am also a bit confused what means "being implemented on the top of Lucene"?

推荐答案

Java Lucene 及其所有其他语言的移植,包括 Zend Lucene,都是搜索.

Java Lucene, and all its ports to other languages, including Zend Lucene, are search libraries.

这意味着为了使用 Zend Lucene,您必须将它包装在其他 (PHP) 代码中,这会将搜索与应用程序的其余部分集成.代码一般需要管理索引、检索和Lucene的一些内务.您使用 PHP 函数调用与 Zend Lucene 通信.

This means that in order to use Zend Lucene, you have to wrap it in other (PHP) code, that will integrate the search with the rest of your application. The code generally needs to manage indexing, retrieval and usually some housekeeping of Lucene. You communicate with Zend Lucene using PHP function calls.

Solr,OTOH,是一个建立在 Lucene 之上的搜索服务器.这意味着 Solr 实例可以作为 servlet 容器(可以是 Tomcat、Jetty 或其他几个此类程序之一)内的独立服务器 web 应用程序运行.设置 Solr 服务器比设置 Lucene 应用程序要容易得多.您可以使用 Solr 做很多事情,而无需编写一行 Java 代码——只需调整一些 XML 配置文件.设置 Solr 服务器可能只需要几分钟.与 Solr 通信的默认方式是使用 HTTP 调用.

Solr, OTOH, is a search server built on top of Lucene. This means that a Solr instance can run as a stand-alone server webapp inside a servlet container (That could be Tomcat, Jetty or one of several other such programs). It is much easier to set up a Solr server than a Lucene application. You can do a lot with Solr without writing a single line of Java - just by tweaking some XML configuration files. Setting up a Solr server may take as few as several minutes. The default way to communicate with Solr is using HTTP calls.

所以基本上 Zend Lucene 安装需要有一个 PHP 服务器以及使用 PHP 库进行正确的索引和检索.Solr 安装需要运行一个 Java servlet 容器并在其中部署一个 war 文件.

So basically Zend Lucene installation requires having a PHP server and proper indexing and retrieval using a PHP library. Solr installation requires running a Java servlet container and deploying a war file into it.

关于性能,Solr 优化了很多 Lucene 缓存和其他参数.另外,我相信 Zend Lucene 比 Java Lucene 慢,所以我敢打赌 Solr 会更快,但这真的取决于具体的应用程序.

Regarding performance, Solr has many of Lucene caching and other parameters optimized. Also, I believe Zend Lucene is slower than Java Lucene, so my bet is that Solr would be faster, but this really depends on the specific application.

这篇关于Zend_Search_Lucene 与 SOLR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆