Commit 1c3d993e authored by fred's avatar fred

use dedicated API to limit solr to some models

parent 2848af9e
......@@ -113,7 +113,7 @@ class EmissionEpisodesDetailView(DetailView, EmissionMixin):
context['search_query'] = self.request.GET.get('q')
if context['search_query']:
# query string
sqs = SearchQuerySet().filter(django_ct='emissions.episode',
sqs = SearchQuerySet().models(Episode).filter(
emission_slug_exact=self.object.slug, text=context['search_query'])
episode_ids = [x.pk for x in sqs]
else:
......@@ -456,7 +456,7 @@ class NewsArchives(TemplateView):
context = super(NewsArchives, self).get_context_data(**kwargs)
context['sectionName'] = "News"
context['search_query'] = self.request.GET.get('q')
sqs = SearchQuerySet().filter(django_ct='emissions.newsitem')
sqs = SearchQuerySet().models(NewsItem)
if context['search_query']:
# query string
sqs = sqs.filter(text=context['search_query'])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment