Created
November 22, 2018 19:06
-
-
Save wparad/b730d7d0b03d8e2158c0589502aa29af to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { "from": 0, | |
| "size": 100, | |
| "version": true, | |
| "sort": [ | |
| { | |
| "_script": { | |
| "order": "desc", | |
| "type": "string", | |
| "script": { | |
| "lang": "painless", | |
| "source": "if (!doc.containsKey('sortableKey.keyword')) { return ''; } for (int i = 0; i < doc['sortableKey.keyword'].length; ++i) { if (doc['sortableKey.keyword'][i].contains('StringThingToSearch')) { return doc['sortableKey.keyword'][i]; } } return '';" | |
| } | |
| } | |
| } | |
| ], | |
| "query": { | |
| "bool": { | |
| "must": [ | |
| { | |
| "terms": { | |
| "identitifier.id": [ | |
| "Id" | |
| ] | |
| } | |
| }, | |
| { | |
| "range": { | |
| "status.new.quantity": { | |
| "gte": 1.0 | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment