nunca he utilizado pajar, pero desde una mirada rápida en the docs y the source parece que usted puede hacer su propio rotulador personalizada y contar pajar de usar que en lugar
from haystack.utils import Highlighter
from django.utils.html import strip_tags
class MyHighlighter(Highlighter):
def highlight(self, text_block):
self.text_block = strip_tags(text_block)
highlight_locations = self.find_highlightable_words()
start_offset, end_offset = self.find_window(highlight_locations)
# this is my only edit here, but you'll have to experiment
start_offset = 0
return self.render_html(highlight_locations, start_offset, end_offset)
y luego configurar
HAYSTACK_CUSTOM_HIGHLIGHTER = 'path.to.your.highligher.MyHighlighter'
en su settings.py
5 años después y tengo el mismo problema. Incluso hay un problema en Github: https://github.com/django-haystack/django-haystack/issues/748 – weeheavy