Can't build index for solr/haystack: unknown field 'django_id'
django, django-haystack, solr
Solution
The problem is with the Solr (haystack document use v3.5.0, here you may be using the latest) not finding the configuration file. These 3 steps worked for me
Place the schema in solr-x.y.z/example/solr/collection1/conf/schema.xml
In the schema change stopwords_en.txt to lang/stopwords_en.txt
Add the version field (as mentioned below) to the schema in the fields section
<field name="_version_" type="long" indexed="true" stored="true" multiValued="false"/>
For more information check out the same discussion in GitHub
Problem
I'm trying to follow along the haystack tutorial. I run into an error when I run manage.py rebuild index I get the following error: ``` WARNING: This will irreparably remove EVERYTHING from your search index. Your choices after this are to restore from backups or rebuild via the `rebuild_index` command. Are you sure you wish to continue? [y/N] y Removing all documents from your index because you said so. All documents removed. /Users/heri0n/python_env/lib/python2.7/site-packages/django/db/models/fields/__init__.py:808: RuntimeWarning: DateTimeField received a naive datetime (2013-04-07 16:14:15.481145) while time zone support is active. RuntimeWarning) Indexing 1 notes. Failed to add documents to Solr: [Reason: None] <response><lst name="responseHeader"><int name="status">400</int><int name="QTime">6</int></lst><lst name="error"><str name="msg">ERROR: [doc=haystacktester.note.3] unknown field 'django_id'</str><int name="code">400</int></lst></response> ``` I did run manage.py build_solr_schema > ~/solr-4.2.1/example/solr/conf/schema.xml I had to create the conf directory manually as it did not exist. I noticed the tutorial uses Solr 3 while I'm on 4. Did the location of the conf dir change perhaps?