Problem adding solr to index using Django-Haystack

I am trying to index a model in Solr using 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 Haystack-Search's “getting started” step-by-step.

I use:

  • latest version of Apache Solr (1.4.1)
  • latest version of django-haystack

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)
+3
source share
2 answers

Verify that the $ SOLR_HOME / conf / schema.xml file contains the declaration of the django_ct field. This is a custom field and must be added manually along with any other custom fields that you use.

+1
source

Try using text = CharField (document

0
source

All Articles