Search code examples
zend-frameworksymfony1solrfull-text-search

Using Apache Lucene Solr for Full Text Searches


We are planning to develop a web application the main highlight of that will be searching user input text (full text search). We are planning to use some PHP framework and APACHE Lucene Solr for this ? How different it is from Hibernate search? Which is a better option? What things should be kept in mind regarding the database if I want to have mostly full text searches on the DB ? Which is the best PHP framework to use with APACHE Lucene? Zend does provide some additional component to use with Lucene. Similarly, Symfony has a plugin for using lucene. This question is very generic in nature and hence any suggestion,regarding the development idea of the web application and its optimization, will be very valuable.


Solution

  • Apache Solr runs in a Java Web Container (Tomcat, Jetty...) and doesn't use a DB but stores directly on the filesystem in index files. The communication of your PHP Application with the Solr Server (running on the same server on a different port or a different server) is done via HTTP (XML, JSON). You need to enable this kind of communication in your PHP App. There are several implementations for connecting PHP with a Solr Server such as Solarium.

    The Zend component you are referring to is probably Zend Search, an implementation of the Apache Lucene algorithm (so you skip the Java part) but you can't take advantage of Solr's features.