Tag Archive for solr

Facetted Solr Queries in CodeIgniter

This is a follow on to my earlier post on my Apache Solr library for CodeIgniter.  If you’ve not read that, that’s where you need to start.  To get your head around it, facetting is similar to MySQL’s aggregate functions (but with so much more).  A good overview on what facetting is comes from David Smiley’s book on Solr (a very useful book – get it!):

Faceting, after searching, is arguably the second-most valuable feature in Solr. It is perhaps even the most fun you’ll have, because you will learn more about your data than with any other feature. Faceting enhances search results with aggregated information over all of the documents found in the search to answer questions such as the ones mentioned  below, given a search on MusicBrainz releases: Read more

CodeIgniter Solr

First things first, Apache Solr is brilliant.  It’s a branch of the Apache Lucene search project, and gives you blindingly-fast, scored search results.  Or, as they say themselves…

Solr is the popular, blazing fast open source enterprise search platform from the Apache Lucene project. Its major features include powerful full-text search, hit highlighting, faceted search, dynamic clustering, database integration, and rich document (e.g., Word, PDF) handling. Solr is highly scalable, providing distributed search and index replication, and it powers the search and navigation features of many of the world’s largest internet sites.

There are some drawbacks to this though.  First, as it’s a Java server, you have to run it on Jetty or Tomcat.  Secondly, the Lucene syntax is a bit tricky to get your head around and get right.  Thirdly, with the exception of the Apache’s PHP-Solr-Client, there’s not much information out there on putting into PHP.  Until now…

Read more