From 3718b965319ce81c9f4c091f91046bff46fa8c47 Mon Sep 17 00:00:00 2001 From: Johannes Raggam Date: Sat, 9 Apr 2011 01:13:15 +0200 Subject: plone integration 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' -- cgit v0.10.2