Zend_Search_Lucene vs SOLR

前端 未结 2 1614
借酒劲吻你
借酒劲吻你 2021-02-05 17:50

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 esp

相关标签:
2条回答
  • 2021-02-05 18:38

    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.

    0 讨论(0)
  • 2021-02-05 18:41

    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.

    0 讨论(0)
提交回复
热议问题