Reputation: 4911
I am readying an app that we want to move to Heroku for various reasons and considering using Solr as a search engine.
I have added the addon, created the schema.xml, saved it to our Solr instance. When running rebuild_index it renders a few errors.
Removing all documents from your index because you said so.
All documents removed.
Indexing 609 projects.
Failed to add documents to Solr: [Reason: ERROR: [doc=project.project.1] unknown field 'description']
Indexing 17 start ups.
Failed to add documents to Solr: [Reason: ERROR: [doc=equity.startup.5] unknown field 'description']
When creating the initial schema.xml file I noticed that it creates a few empty fields which I think should not occur, changed them, but still running the index fails.
attached is a paste of the XML Schema
I would really appreciate if someone has some knowledge on why this happens, doesn't seem to be a lot of info about Solr and why this happens.
Upvotes: 0
Views: 231
Reputation: 4911
I managed to sort this out.
An easy way is too look towards heroku for the sample XML file.
instead of running
./manage.py build_solr_schema > schema.xml
locally, run it on Heroku and simply copy and paste the output to your console.
heroku run python manage.py build_solr_schema
Hope this helps
Upvotes: 1