0

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.

nikhil500
  • 3,458
  • 19
  • 23
gentrobot
  • 673
  • 6
  • 25

2 Answers2

3

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.

Omar Kohl
  • 1,372
  • 2
  • 15
  • 32
  • Thanks Omar for the answer. Since, SOLR doesn't use a DB and my requirement is to do full text searches, should I try and explore something else, like Sphinx ? Or I just need to use a different design approach (XML,JSON communication), as mentioned by you? – gentrobot Feb 02 '12 at 06:04
  • Solr is a search server therefore it is perfect for doing searches ;-) With Sphinx (as far as I know) you search directly on the DB, which might be what you want. If you use Solr first you have to index your DB content (also done via XML or JSON) and update those indexes every time you update your data. Which one is better for you depends on your needs. More info: http://stackoverflow.com/questions/1400892/search-engine-lucene-or-solr – Omar Kohl Feb 02 '12 at 09:40
0

Solr has enough feature to use with it, It has full-text search, hit highlighting, faceted search, dynamic clustering, Caching, Range queries and geospatial search. We are running our CMS website on top of Solr, we able to handle all type of search request with in Solr.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Kalidoss.M
  • 479
  • 5
  • 6