Zend_Search_Lucene vs SOLR

主宰稳场 提交于 2019-12-03 11:58:46

问题


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"?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/3037564/zend-search-lucene-vs-solr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!