Some of you read my previous posts The state of open source search. I will in this post go through the process of downloading, installing, configuring and using Apache SOLR to index some sample XML data and search it.
This is the first post in a series, where each new post will explore some new feature. We will simply follow the tutorial to get SOLR up and running locally.
We start by visiting the SOLR Tutorial for the first steps, and simply get the app running:
- Check Java version, download SOLR (I chose this file), unpack it, and cd to apache-solr-1.2.0/example
- java -jar start.jar
- Visit http://localhost:8983/solr/admin/ to see the admin page with a simple test GUI
- Try hit the search button, you get the XML response back with 0 results
- Now try indexing some content. CD to example/exampledocs
- java -jar post.jar solr.xml monitor.xml
- Now try searching again and see that you get some hits!
For part two we will get SOLR running in a Tomcat instance, customize the schema a bit and present search results in a custom web page using the client API.