【发布时间】:2011-03-19 21:47:09
【问题描述】:
我正在尝试使用 django-haystack 为 Solr 中的模型建立索引,但它返回了以下错误(使用rebuild_index 或 update_index 时):
Failed to add documents to Solr: [Reason: ERROR:unknown field 'django_ct']
我一步步跟着 Haystack-Search 的“入门”。
我正在使用:
- 最新版本的 Apache Solr (1.4.1)
- django-haystack 最新版本
我的 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)
【问题讨论】:
标签: python django django-haystack