Of Code and Me

Somewhere to write down all the stuff I'm going to forget and then need

Using Solr and Lucene with Asp.Net and Windows May 28, 2010

Filed under: Solr,Web — Rupert Bates @ 5:10 pm

Lucene and the Solr server layer which builds on it are probably the most widely used search technology on the internet today. And guardian.co.uk has recently adopted it as our main search technology and the platform on which our OpenPlatform is based. Because it is by the Apache foundation though I think there is a perception amongst .Net developers that it will be very difficult to use from .Net and will need to run on Linux; this is completely wrong. I have recently been working on incorporating it into an Asp.Net site which we have and it has been very easy indeed.

First step is to download Solr from here or you can also get “A comprehensive, tested version of Apache Solr based on the most recent stable Solr version with additional utilities, bug fixes and performance enhancements.” from Lucid Imagination. I just went with the standard Apache version.

You also need the Java runtime installed, preferably version 6.

Extract the zip file into a directory on your hard drive, go to that directory in a command prompt, then to the \examples directory and type java -jar start.jar. You should see the server start up and spit out a load of information, and that’s it! Up and running on Windows. Just to make sure, go to http://localhost:8983/solr/admin/ and you should see the Solr admin site.

The next thing to do is to work through the excellent tutorial here to get an idea of how Solr works. In my next post I’ll talk about defining schemas and connecting to Solr from .Net.


2 Responses to “Using Solr and Lucene with Asp.Net and Windows”

  1. Jose Maria Gallego Says:

    Hello. I’m doing a small application in ASP. net with VB.NET and one of the options that I find text strings in documents pdf, odt and doc we have stored on a server. How do you refer to Solr from vb.net? Would you have any simple example?

    Sorry by my bad english.

    thank you very much

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s