Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GET hockey/_search
- {
- "query": {
- "function_score": {
- "script_score": {
- "script": {
- "lang": "painless",
- "inline": "int total = 0; for (int i = 0; i < doc['goals'].length; ++i) { total += doc['goals'][i]; } return total;"
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement