Skip to content
Snippets Groups Projects
Commit 1704583892a8 authored by Arthur Lutz's avatar Arthur Lutz
Browse files

[views] backport fix from elasticsearch-dsl

parent faea48125bbf
No related branches found
No related tags found
No related merge requests found
......@@ -66,8 +66,8 @@
"""
Add custom highlighting
"""
return search.highlight(*self.fields) \
.highlight_options(pre_tags="",
search = search.highlight(*(f if '^' not in f else f.split('^', 1)[0] for f in self.fields))
return search.highlight_options(pre_tags="",
post_tags="",
fragment_size=150)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment