Sunday, 29 September 2013

How do I access my query when using Haystack/Elasticsearch?

How do I access my query when using Haystack/Elasticsearch?

I originally followed this tutorial
(https://django-haystack.readthedocs.org/en/latest/tutorial.html), and
have so far been able to highlight my query within my returned results.
However, I want to highlight this same query when visiting the next page
that I load with a separate template. Is there any way to save/access this
query so that I can highlight the same results within this other template?
Whenever I try and include a statement like this, I get an error, which
I'm thinking is because I'm not trying to access the query properly.
{% highlight section.body with query html_tag "span" css_class
"highlighted" %}

No comments:

Post a Comment