diff options
Diffstat (limited to 'helsinki/program')
-rw-r--r-- | helsinki/program/search_indexes.py | 14 | ||||
-rw-r--r-- | helsinki/program/settings.py | 4 |
2 files changed, 6 insertions, 12 deletions
diff --git a/helsinki/program/search_indexes.py b/helsinki/program/search_indexes.py index 8c21e14..745f379 100644 --- a/helsinki/program/search_indexes.py +++ b/helsinki/program/search_indexes.py @@ -6,18 +6,10 @@ from datetime import datetime from program.models import Note, Show class NoteIndex(SearchIndex): - text = CharField(document=True, use_template=True) - last_updated = DateTimeField(model_attr='last_updated') - - def get_queryset(self): - return Note.objects.filter(last_updated__lte=datetime.now()) + SearchableText = CharField(document=True, use_template=True) class ShowIndex(SearchIndex): - text = CharField(document=True, use_template=True) - last_updated = DateTimeField(model_attr='last_updated') - - def get_queryset(self): - return Show.objects.filter(last_updated__lte=datetime.now()) + SearchableText = CharField(document=True, use_template=True) site.register(Note, NoteIndex) -site.register(Show, ShowIndex)
\ No newline at end of file +site.register(Show, ShowIndex) diff --git a/helsinki/program/settings.py b/helsinki/program/settings.py index 1e3af2a..036fe3e 100644 --- a/helsinki/program/settings.py +++ b/helsinki/program/settings.py @@ -71,4 +71,6 @@ INSTALLED_APPS = ( HAYSTACK_SITECONF = 'helsinki.program.search_sites' HAYSTACK_SEARCH_ENGINE = 'solr' -HAYSTACK_SOLR_URL = 'http://localhost:8983/solr' +HAYSTACK_SOLR_URL = 'http://localhost:8988/solr' +# plone integration +HAYSTACK_ID_FIELD = 'docid' |