Skip to content

Instantly share code, notes, and snippets.

@jarosan
Created January 24, 2012 14:08
Show Gist options
  • Save jarosan/1670346 to your computer and use it in GitHub Desktop.
Save jarosan/1670346 to your computer and use it in GitHub Desktop.
curl -X GET "http://localhost:9200/development_places/place/_search?pretty=true" -d '
{
"query" : {
"filtered" : {
"query" : {
"custom_score" : {
"query" : {
"match_all":{}
},
"script" : "_source.search_ranking * -1"
}
},
"filter" : {
"script" : {
"script" : "_source.search_ranking > 20"
}
}
}
},
"size":5,
"from":0
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment