Skip to content

Instantly share code, notes, and snippets.

@frazerh
Created January 11, 2012 19:15
Show Gist options
  • Save frazerh/1596260 to your computer and use it in GitHub Desktop.
Save frazerh/1596260 to your computer and use it in GitHub Desktop.
Elasticsearch not respecting timeout parameter
Expensive child query
---------------------
curl -XGET 'http://localhost:9200/test/_search?pretty=true&timeout=2' -d '
{
"query" : {
"has_child" : {
"type" : "comment",
"query" : {
"term" : { "subject" : "*" }
}
}
}
}
'
{
"took" : 56525,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" : [ ]
}
}
Simple query
------------
curl -XGET 'http://localhost:9200/test/_search?pretty=true&timeout=2' -d '
{
"query" : {
"query_string":
{
"query":"*"
}
}
}'
{
"took" : 50,
"timed_out" : true,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" : [ ]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment