Using Local Solr

Beginner Level
Under the covers of the demo, there are several processes occurring.


The demo already comes with data indexed, the raw data we're using in the demo is available in


Lets begin with removing solrs existing index, stop solr if it's running, then delete / rename


Restart solr, by running java -jar start.jar again, verify that the index directory if empty by going
to solr's admin web page http://localhost:8983/solr/admin/, and clicking on [Statistics].

Uploading the data is as simple as running solr's post jar

java -jar solr-example/apache-solr-1.3-dev/example/exampledocs/post.jar

*Obviously on Windows, the '/' would be replaced with ''.

Querying localsolr is as simple as using 5 parameters

  • q, solr's query parameter
  • qt, query type, we specify 'geo' to activate local solr.
  • lat, latitude of the point you want to begin searching from.
  • long, longitude of the point you want to begin searching from.
  • radius, radius in miles from the point you want search from.

Resulting in:


There are often questions around this, some of which are answered in the F.A.Q or in the up coming pages.

  • One common question is, 'how do I get the latitude / longitude of an address?'
    • Hopefully this is addressed in the GeoCoding section.