I need to install Solr on Windows Server 2008 R2, and integrate it with a asp.net mvc3 application. I have tried to find the docs on how to install/setup solr on windows server, but found no good docs / help. Moreover, after install I want to integrate results into asp.net mvc3 applications, so a search query and results need to be displayed there. I'm also clue less how to do this. Although both the questions are little different, any suggestions / document that may help us getting started are truly welcome.
-
I would suggest that you install it using [**Bitami** stack](http://bitnami.org/stack/solr) – balexandre Feb 12 '13 at 02:59
5 Answers
Here is the step by step procedure to get you started:
Step 1: Download Solr. It's just a zip file.
Step 2: Copy from your SOLR_HOME_DIR/dist/apache-solr-1.3.0.war
to your tomcat webapps directory: $CATALINA_HOME/webapps/solr.war
– Note the war file name change. That’s important.
Step 3: Create your solr home directory at a location of your choosing. This is where the configuration for that solr install resides. The easiest way to do this is to copy the SOLR_HOME_DIR/examples/solr
directory to wherever it is you want your solr home container to be. Say place it in C:\solr
.
Step 4: Hope you have set your environment variables, if not then please set JAVA_HOME
, JRE_HOME
, CATALINA_OPTS
, CATALINA_HOME
. Note that CATALINA_HOME
refers to your Tomcat directory & CATALINA_OPTS
refers to the amount of heap memory you want to give to your Solr.
Step 5: Start tomcat. Note this is only necessary to allow tomcat to unpack your war file. If you look under $CATALINA_HOME/webapps
there should now be a solr directory.
Step 6: Stop tomcat
Step 7: Go into that solr directory and edit WEB-INF/web.xml
. Scroll down until you see an entry that looks like this:
<!-- People who want to hardcode their "Solr Home" directly into the
WAR File can set the JNDI property here...
-->
<!--
<env-entry>
<env-entry-name>solr/home</env-entry-name>
<env-entry-value>/Path/To/My/solr/Home/solr/</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
-->
Set your Solr home (for example: C:\solr
) and uncomment the env entry.
Step 8: Start Tomcat again, and things should be going splendidly. You should be able to verify that solr is running by trying the url http://localhost:8080/solr/admin/
.
The other answers here are good enough to get you integrate Solr with your ASP.Net & it should be pretty simple as Solr exposes HTTP.
-
thank you for this detailed answer, I'll be doing it tomorrow... will post here if face any issues... – Krunal Jun 01 '12 at 10:14
-
Just an update that it worked great.. and I was able to install it without any issues. Thanks Yavar for your detailed answer. – Krunal Feb 13 '13 at 05:06
installing on windows means:
- donwloading zip from apache
- unzipping to the dir you desire
that's all, now you have to define you schema.xml, solrconfig.xml etc, start with the solr tutorial

- 15,593
- 11
- 47
- 78
Tomcat application server can host your solr instances.
http://wiki.apache.org/solr/SolrTomcat#Multiple_Solr_apps
Put in an XML file (given in that page) /var/lib/tomcat6/conf/Catalina/localhost
to register the Solr app and
in conf/solrconfig.xml
set the index directory
<dataDir>${solr.data.dir:/var/www/app/app_indexer}</dataDir>
. Sorry for the Linux paths...
As for a .Net library, SolrNet is discussed here on StackOverflow often.

- 22,498
- 32
- 109
- 202
To install Solr simply install 64-bit version of Tomcat and deploy Solr war file.
To incorporate Solr (request and result pages) into my asp.net app I used AJAX Solr.
Here is a demo of how it may look like.

- 5,622
- 2
- 34
- 55
There is a good article on this site which offers solr integration plugin for nopcommerce. They have a very good support and documentation here that might be helpful to you:
http://www.nopaccelerate.com/wiki/installing-apache-solr/
and
http://www.nopaccelerate.com/wiki/configuring-apache-solr-to-use-with-nopaccelerate/
Thanks, all the best.

- 704
- 3
- 18
- 34