Skip to content

Commit

Permalink
[7.x] Update script_fields example to avoid DeprecationWarning
Browse files Browse the repository at this point in the history
  • Loading branch information
tommyzli authored and sethmlarson committed Jul 15, 2021
1 parent b162417 commit cc5b0d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion elasticsearch_dsl/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,8 @@ def script_fields(self, **kwargs):
s = s.script_fields(
times_three={
'script': {
'inline': "doc['field'].value * params.n",
'lang': 'painless',
'source': "doc['field'].value * params.n",
'params': {'n': 3}
}
}
Expand Down

0 comments on commit cc5b0d1

Please sign in to comment.