I am using haystack and elasticsearch. I am building indexes in the following manner-->
class BookIndex(indexes.SearchIndex,indexes.Indexable):
text= indexes.CharField(document=True,use_template=True)
content_auto = indexes.EdgeNgramField(model_attr='title',boost=1.5)
isbn_13 = indexes.CharField(model_attr='isbn_13')
category = indexes.CharField()
sub_category = indexes.CharField()
def prepare_sellers(self, Book):
return [seller.name for seller in Book.sellers.all()]
def prepare_category(self, Book):
return [Book.category.name]
def prepare_sub_category(self, Book):
return [Book.sub_category.name]
And I have included the following in the settings file :-
HAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor'
But when I am going to add data to my database by doing -> http://dpaste.com/01739SW , haystack index updating is failing and I am getting the following error-->http://dpaste.com/2YGXZ8J
Can someone please help me out in fixing the issue. Thank you.