Zend_Search_Lucene 与 SOLR

发布于 2024-09-06 05:55:28 字数 197 浏览 10 评论 0原文

我最近偶然发现了 Lucene 项目的 Zend Lucene 端口。我对 SOLR 有一点经验,所以我想知道它们两者之间有什么区别,特别是从性能和安装方面来看。

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

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

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.

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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

撧情箌佬 2024-09-13 05:55:28

Java Lucene 及其对其他语言的所有移植(包括 Zend Lucene)都是搜索库。

这意味着为了使用 Zend Lucene,您必须将其包装在其他 (PHP) 代码中,以便将搜索与应用程序的其余部分集成。代码通常需要管理索引、检索以及 Lucene 的一些日常工作。您可以使用 PHP 函数调用与 Zend Lucene 进行通信。

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

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

在性能方面,Solr对Lucene缓存等参数进行了很多优化。另外,我相信 Zend Lucene 比 Java Lucene 慢,所以我打赌 Solr 会更快,但这实际上取决于具体的应用程序。

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

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

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.

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.

翻了热茶 2024-09-13 05:55:28

上面的答案是根据两者之间的比较得出的一些评论。

要进行更深入的分析,我建议查看以下内容:

Solr 和 Zend Lucene 之间的比较

The answer above takes some comments from this comparison between the two.

For a more in-depth analysis, I would recommend looking at this:

Comparison between Solr and Zend Lucene.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文