Skip to content

Instantly share code, notes, and snippets.

@emarthinsen
Last active December 17, 2015 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emarthinsen/5631387 to your computer and use it in GitHub Desktop.
Save emarthinsen/5631387 to your computer and use it in GitHub Desktop.
curl -X GET 'http://elasticsearch.local/listings/_search?pretty' -d '
{
"from": 0,
"size": 20000,
"query": {
"bool": {
"must": [
{"term": {"state":{"term":"active"}}},
{"term": {"account_type":{"term":"free"}}},
{"term": {"location_url":{"term":"boston"}}}
]
}
},
"sort":[
{
"_script": {
"script": "(doc[\u0027id\u0027].value + salt).hashCode()",
"type": "string",
"params": {"salt":"xcv89734jkfd7vui"},
"order":"asc"
}
}
]
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment