I'm following this tutorial on setting up django-haystack and solr: http://django-haystack.readthedocs.org/en/latest/tutorial.html
I hit a stumbling block here:
If you’re using the Solr backend, you have an extra step. Solr’s configuration is XML-based, so you’ll need to manually regenerate the schema. You should run ./manage.py build_solr_schema first, drop the XML output in your Solr’s schema.xml file and restart your Solr server.
Where is my schema.xml file located? It says it should in the Solr home directory and the .conf folder. But where is the Solr home directory, and/or how do I configure its location?
When you first install Solr, your home directory is server/solr . However, some examples may change this location (such as, if you run bin/solr start -e cloud , your home directory will be example/cloud ). The home directory contains important configuration information and is the place where Solr will store its index.
The solrconfig. xml file is the configuration file with the most parameters affecting Solr itself.
Solr has several configuration files that you will interact with during your implementation. Many of these files are in XML format, although APIs that interact with configuration settings tend to accept JSON for programmatic access as needed.
The solr home is the place where you can find your schema.xml
and solrconfig.xml
, as well as some other files depending on the text analysis you're using (dictionaries for stemming, stopwords etc.), and where your index gets created by default.
There are a couple of ways to configure the solr home, since it is located outside of the servlet container:
You can either check your servlet container configuration or go to the Solr admin page http://host:port/solr/admin
, which prints out the actual solr home location together with other information about the solr instance running.
First check whether your Solr instance is working. Got to -> http://localhost:8983/solr
If you can see a Solr web panel you have a live Solr instance. Now go to Java Properties
Here you will see the the variables. This is where you can find the home DIRs
Note schema is now managed. If you want to override this you will have to hack it a bit. check here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With