How to delete Solr index

Your index is stored in \Solr\core\data
Eg. \Solr\collection1\data

If you delete the data folder or underlying folders “index” and “tlog”, it will delete your index.

Delete Solr index data

A nicer way of achieving this, is by running the following HTTP command


Password protect Solr admin

Solr HTTP admin interface is per default unprotected and can be accessed by everyone.
To secure the interface with HTTP web authentication follow these steps.




<web-app xmlns=""


        Solr Lockdown
    <description>solr users</description>




<tomcat-users> </tomcat-users>


<user name="myUsername" password="myPassword" roles="admin-gui,manager-gui,solr_admin"></user>

SimplePropertiesWriter Unable to read:

After setting Solr DataImportHandler up and trying to fetch data from SQL Server via the HTTP API (http://localhost:8080/solr/dataimport?command=full-import) I got an error response back, telling all changes had been rolled back.

<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">7</int>
<lst name="initArgs">
</lst><lst name="defaults">
<str name="config">data-config.xml</str>
<str name="command">full-import</str>
<str name="status">idle</str>
<str name="importResponse"></str>
<lst name="statusMessages">
<str name="Time Elapsed">0:1:19.495</str>
<str name="Total Requests made to DataSource">1</str>
<str name="Total Rows Fetched">0</str>
<str name="Total Documents Processed">0</str>
<str name="Total Documents Skipped">0</str>
<str name="Full Dump Started">2013-08-14 11:20:59</str>
<str name="">Indexing failed. Rolled back all changes.</str>
<str name="Rolledback">2013-08-14 11:21:28</str>
<str name="WARNING">
This response format is experimental. It is likely to change in the future.

The Catalina log didn’t tell me anything useful, but checking “Logging” in http://localhost:8080/solr/ threw:

WARN SimplePropertiesWriter Unable to read:

It simply says that Solr is unable to read the file
The file is not a part of the standard Solr package and is not created automatically.
To fix this warning, simply created an empty file called “” in your Solr conf directory, eg. /Solr/collection1/conf/ and make sure Apache has write access to it.

Install Solr under Windows

Install Solr under Windows

Installing and getting Solr up and running is straight forward, as long as you follow these simple steps. I ran into problems myself trying to get Solr starting up under Tomcat, even after reading several posts explaining how to, which is why I wrote this post, explaining all the necessary steps. Feel free to make a comment, if you have any questions or run into problems.

1. Download Apache Tomcat from Apache Software Foundation. I downloaded and installed Tomcat 7.0.42 “32-bit/64-bit Windows Service Installer” under the location c:\Tomcat\

2. Download the latest version of “Solr”. I downloaded Solr 4.4.0.
– Open, navigate to \example\solr and extract the directories and files to c:\solr\, so it contains; bin, collection1, README.txt, solr.xml and zoo.cfg

– Again in navigate to \example\lib and extract all the jar-files into c:\Tomcat\lib\. Repeat the same procedure with the jar-files in \examples\lib\ext.

– In navigate to \example\webapps and extract solr.war to c:\Tomcat\webapps\. If the file is called solr-versionNumber.war, rename it to solr.war

3. In C:\Tomcat\conf\Catalina\localhost create a file called “solr.xml” with following content, where you specify Solr docBase “c:/Tomcat/webapps/solr.war” and enviroment value “/Tomcat/webapps/”.

<?xml version="1.0" encoding="UTF-8"?>
<context docBase="c:/Tomcat/webapps/solr.war" debug="0" crossContext="true" >
    <environment name="solr/home" type="java.lang.String" value="/Tomcat/webapps/" override="true"></environment>

4. Open up C:\Tomcat\webapps\solr\WEB-INF\web.xml and uncomment the following and replace “/put/your/solr/home/here” with your solr location


During these steps you might have to stop and start your Apache Tomcat to be able to write to the files and reload the changes. To stop/start Apache Tomcat, click the Apache icon in the task bar and click “Stop service / Start service”.

Restart Apache Tomcat Windows

You should now be able to navigate to http://localhost:8080/solr/ and get the Solr admin site, presuming you installed Apache Tomcat on port 8080 (as per default)

Solr 4.4.0 admin page

If you run into problems, you can view the Catalina log located in c:\Tomcat\logs\