I am trying to implement search with Django haystack and solr, but I get this error when trying to implement faceted searching on a SearchIndex and then trying to run the server:
TypeError: init() got an unexpected keyword argument 'faceted'
Here is the SearchIndex:
import datetime
from haystack.indexes import *
from haystack import site
from resources.models import Resource
class ResourceIndex(SearchIndex):
text = CharField(document=True, use_template=True)
author = CharField(model_attr='submitter', faceted=True)
pub_date = DateTimeField(model_attr='created')
def get_queryset(self):
"""Used when the entire index for model is updated."""
return Resource.objects.filter(last_modified__lte=datetime.datetime.now())
site.register(Resource, ResourceIndex)