Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building Solr indexes through Haystack throws unknown field error

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?

like image 596
Sriram Avatar asked Feb 20 '10 07:02

Sriram


People also ask

What causes indexing errors in Solr?

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.

Why do I get Solr log error when I insert dynamicfield?

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.

How to add a default Solr index to a Sitecore index?

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!

How do I add a CS-CZ locale to a Solr field?

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>:


2 Answers

The schema.xml was malformed as I had copied additional text from the console.

like image 42
Sriram Avatar answered Jan 02 '23 16:01

Sriram


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

like image 185
jturnbull Avatar answered Jan 02 '23 17:01

jturnbull