I'm trying to integrate Haystack with Solr. When I try to build the index, I get an error "Unknown field django_id" from SOLR. What's causing this to happen?
Most indexing errors are due to a mismatch between the collection’s schema and the incoming data. Look in the solr.log file or in the Logging screen of the Solr Dashboard for errors that mention schema fields.
This looks like the schema.xml doesn't have all of the fields defined. the SOLR log error says that a field isn't defined. I would make sure your your schema.xml is correct. After you update your schema.xml in solr, ensure you restart the solr instance, to have the effect of inserted dynamicField.
in the Sitecore.ContentSearch.Solr.DefaultIndexConfiguration.config under nodes [sitecore > contentSearch > indexConfigurations > defaultSolrIndexConfiguration > fieldNames] Note: you need to have an entry for each field if you are using this approach. Thanks for contributing an answer to Sitecore Stack Exchange!
Sitecore stores language-specific text fields in Solr by adding a suffix that corresponds to the locale name. The field for the cs-cz locale is missing in the index schema, so you'll need to add it. In the schema.xml of every Solr index, insert the following node under <fields>:
The schema.xml was malformed as I had copied additional text from the console.
You also get this error if you haven't given Solr the schema.xml file which Haystack generates for you, as explained here in the docs.
django-haystack.readthedocs.io/en/latest/tutorial.html#reindex
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