summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Raggam <raggam-nl@adm.at>2011-04-08 23:13:15 (GMT)
committerJohannes Raggam <raggam-nl@adm.at>2011-04-08 23:13:15 (GMT)
commit3718b965319ce81c9f4c091f91046bff46fa8c47 (patch)
tree3aaa4d3e925dbdcd8f5dee7f3998564226f29abc
parentde060aca81bf86472d37b8fc157e2984ec8ce791 (diff)
plone integration
-rw-r--r--helsinki/program/search_indexes.py14
-rw-r--r--helsinki/program/settings.py4
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'