Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zend_Search_Lucene vs 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.

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

like image 724
spacemonkey Avatar asked Jun 14 '10 13:06

spacemonkey


People also ask

What is SOLR used for?

Solr is a search server built on top of Apache Lucene, an open source, Java-based, information retrieval library. It is designed to drive powerful document retrieval applications - wherever you need to serve data to users based on their queries, Solr can work for you.

Is SOLR based on Lucene?

Solr is the popular, blazing-fast, open source enterprise search platform built on Apache Lucene™.

Is Solr open-source?

Solr is a leading open source search engine from the Apache Software Foundation's Lucene project.


1 Answers

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.

like image 157
Yuval F Avatar answered Sep 19 '22 00:09

Yuval F