[dropcap style=”dropcap2″] M [/dropcap]any people will look at the title and think wtf is Solr? A couple of days ago I was one of these people.
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, rich document (e.g., Word, PDF) handling, and geospatial search. 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. – http://lucene.apache.org/solr/
It’s very surprising to learn that there are alot of popular websites that utilise solr:
- http://www.buy.com
- http://www.ticketmaster.com/
- http://www.ebuyer.com
- http://digg.com/
- http://instagram.com/
The above is a sample taken from http://wiki.apache.org/solr/PublicServers/ . I was quite excited to play about with this project.
Getting Started
This was a simple and quick process to get Solr working locally. Following instructions on http://lucene.apache.org/solr/tutorial.html meant I had a working windows environment.
Once you have setup your schema, Solr config and data config from the above tutorial we’re on a winner.
The above grabbing data from a Sql server database
Import done we can now search all the documents within the index.
Problems encountered
Having Sql server as a datasource the “sqljdbc4-3.0.jar” file has to be in the lib directory otherwise an error will be thrown. Once it’s there I needed to let Solr know where to find this file. To do this I updated the solrconfig.xml to include:
<lib dir=”./solr/lib” />
This allowed me to finally run the DataImporterHelper without any errors.
Interesting Solr Reads
- Nick Veenhof – Latest Solr post – Let’s talk Apache Solr Clean Url’s
- Kevin Tan – http://www.supermind.org/blog/
- Software Engineering Radio – Episode 187 : Grant Ingersoll on the Solr Search Engine
- Solr Enterprise search – all things to be found
- Stackoverflow – Solr vs. ElasticSearch
Final thoughts
Out of the box Solr is a very power search platform and I look forward to learning more about this product. I have started to read Apache Solr 3.1 Cookbook to gain better understandings to put to use:
Using information from various FAQs, tutorials, Wikis and snippets from the Cookbook I hope to get a better grounding of the product that I can put to good use.