We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2831d08 + 3e5b37d commit bbcd038Copy full SHA for bbcd038
docs/searchqueryset_api.rst
@@ -252,6 +252,14 @@ instead of normal keyword arguments::
252
result = sqs[0]
253
result.highlighted['other_field'][0] # u'Two computer scientists walk into a bar. The bartender says "<span class="highlighted">Foo</span>!".'
254
255
+Elasticsearch accepts keyword arguments::
256
+
257
+ # Use the ``pre_tag`` and ``post_tag`` keywords and pass the desired tags as lists.
258
+ sqs = SearchQuerySet().filter(content='foo').highlight(
259
+ pre_tags=['<strong>'], post_tags=['</strong>'])
260
+ result_example = " ".join(sqs[0].highlighted)
261
+ # u'Two <strong>foo</strong> computer scientists walk into a bar. The bartender says "<strong>Foo</strong>!"'
262
263
``models``
264
~~~~~~~~~~
265
0 commit comments