Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

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 timscott/873473 to your computer and use it in GitHub Desktop.
Save timscott/873473 to your computer and use it in GitHub Desktop.
Shows how to recreate AlreadyClosedException when creating a percolator in 0.15.2
curl -XPUT localhost:9200/test/test/1?pretty=true -d'
{"Content": "foo bar"}'
{
"ok" : true,
"_index" : "test",
"_type" : "test",
"_id" : "1",
"_version" : 1
}
curl -XGET localhost:9200/test/_search?pretty=true -d'
{"query":{"bool":{"must":[{"field":{"Content":{"query":"foo bar","phrase_slop":0}}}]}}}'
{
"took" : 3,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 0.2712221,
"hits" : [ {
"_index" : "test",
"_type" : "test",
"_id" : "1",
"_score" : 0.2712221, "_source" : {"Content": "foo bar"}
} ]
}
}
curl -XPUT localhost:9200/_percolator/test/999?pretty=true -d'
{"query":{"bool":{"must":[{"field":{"Content":{"query":"foo bar","phrase_slop":0}}}]}}}'
{
"error" : "AlreadyClosedException[this Analyzer is closed]",
"status" : 500
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment