Skip to content

Instantly share code, notes, and snippets.

@LarsFronius
Created December 9, 2013 11:58
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 LarsFronius/7871213 to your computer and use it in GitHub Desktop.
Save LarsFronius/7871213 to your computer and use it in GitHub Desktop.
weird performance on elasticsearch
POST /foobar/photo/_search
{
"query": {
"function_score": {
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"geohash_cell": {
"location": {
"lat": 54.462555,
"lon": 9.84169
},
"precision": 4,
"neighbors": true
}
}
}
}
}
}
}
->
{
"took": 5,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"hits": {
"total": 892,
"max_score": 1,
POST /foobar/photo/_search
{
"query": {
"function_score": {
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"geohash_cell": {
"location": {
"lat": 54.462555,
"lon": 9.84169
},
"precision": 4,
"neighbors": true
}
}
}
}
}
},
"sort": {
"uploaded": {
"order": "desc"
}
}
}
WEEEIRD ->
{
"took": 7649, <-------!!!
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"hits": {
"total": 892,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment