I'm trying to index a model in Solr with django-haystack, but it returns me the following error(when using rebuild_index or update_index) :
Failed to add documents to Solr: [Reason: ERROR:unknown field 'django_ct']
I followed step by step the "getting started" of Haystack-Search.
I'm using :
my search_indexes.py :
from haystack.indexes import *
from haystack import site
from models import Entity
class EntityIndex(SearchIndex):
name = CharField(document=True)
def get_queryset(self):
return Entity.objects.all()
site.register(Entity, EntityIndex)
Be sure your $SOLR_HOME/conf/schema.xml file contains the 'django_ct' field declaration. That is a custom field and needs to be added manually along with any other custom fields you are using.
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