In my test script, I create two indices, then add 28 documents, then try searching on those.
When I get to the final facets query, the cluster never responds, and then remains unresponsive to all further queries. One of the nodes balloons to 631MB of resident memory - I presume this is some sort of max allowed by java.
Then when closing down the nodes, two close down fine, and the third throws exceptions like the ones listed below.
curl -XGET 'http://127.0.0.1:9200/_cluster/nodes'
# {
# "clusterName" : "elasticsearch",
# "nodes" : {
# "getafix-10912" : {
# "httpAddress" : "inet[/127.0.0.2:9200]",
# "dataNode" : true,
# "transportAddress" : "inet[getafix.traveljury.com/127.0.
# > 0.2:9300]",
# "name" : "Ameridroid"
# },
# "getafix-62342" : {
# "httpAddress" : "inet[/127.0.0.2:9201]",
# "dataNode" : true,
# "transportAddress" : "inet[getafix.traveljury.com/127.0.
# > 0.2:9302]",
# "name" : "Super Sabre"
# },
# "getafix-27084" : {
# "httpAddress" : "inet[/127.0.0.2:9202]",
# "dataNode" : true,
# "transportAddress" : "inet[getafix.traveljury.com/127.0.
# > 0.2:9301]",
# "name" : "Shadow Slasher"
# }
# }
# }
curl -XPUT 'http://127.0.0.2:9201/es_test/' -d '
{}
'
# {
# "ok" : true
# }
curl -XPUT 'http://127.0.0.2:9201/es_test_2/' -d '
{}
'
# {
# "ok" : true
# }
curl -XPOST 'http://127.0.0.2:9201/_flush?refresh=true'
# {
# "ok" : true,
# "_shards" : {
# "failed" : 0,
# "successful" : 20,
# "total" : 20
# }
# }
curl -XPUT 'http://127.0.0.2:9201/es_test/type_1/1?opType=create' -d '
{
"num" : 2,
"text" : "foo"
}
'
# {
# "ok" : true,
# "_index" : "es_test",
# "_id" : "1",
# "_type" : "type_1"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test/type_2/2?opType=create' -d '
{
"num" : 3,
"text" : "foo"
}
'
# {
# "ok" : true,
# "_index" : "es_test",
# "_id" : "2",
# "_type" : "type_2"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test_2/type_1/3?opType=create' -d '
{
"num" : 4,
"text" : "foo"
}
'
# {
# "ok" : true,
# "_index" : "es_test_2",
# "_id" : "3",
# "_type" : "type_1"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test_2/type_2/4?opType=create' -d '
{
"num" : 5,
"text" : "foo"
}
'
# {
# "ok" : true,
# "_index" : "es_test_2",
# "_id" : "4",
# "_type" : "type_2"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test/type_1/5?opType=create' -d '
{
"num" : 6,
"text" : "foo bar"
}
'
# {
# "ok" : true,
# "_index" : "es_test",
# "_id" : "5",
# "_type" : "type_1"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test/type_2/6?opType=create' -d '
{
"num" : 7,
"text" : "foo bar"
}
'
# {
# "ok" : true,
# "_index" : "es_test",
# "_id" : "6",
# "_type" : "type_2"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test_2/type_1/7?opType=create' -d '
{
"num" : 8,
"text" : "foo bar"
}
'
# {
# "ok" : true,
# "_index" : "es_test_2",
# "_id" : "7",
# "_type" : "type_1"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test_2/type_2/8?opType=create' -d '
{
"num" : 9,
"text" : "foo bar"
}
'
# {
# "ok" : true,
# "_index" : "es_test_2",
# "_id" : "8",
# "_type" : "type_2"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test/type_1/9?opType=create' -d '
{
"num" : 10,
"text" : "foo bar baz"
}
'
# {
# "ok" : true,
# "_index" : "es_test",
# "_id" : "9",
# "_type" : "type_1"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test/type_2/10?opType=create' -d '
{
"num" : 11,
"text" : "foo bar baz"
}
'
# {
# "ok" : true,
# "_index" : "es_test",
# "_id" : "10",
# "_type" : "type_2"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test_2/type_1/11?opType=create' -d '
{
"num" : 12,
"text" : "foo bar baz"
}
'
# {
# "ok" : true,
# "_index" : "es_test_2",
# "_id" : "11",
# "_type" : "type_1"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test_2/type_2/12?opType=create' -d '
{
"num" : 13,
"text" : "foo bar baz"
}
'
# {
# "ok" : true,
# "_index" : "es_test_2",
# "_id" : "12",
# "_type" : "type_2"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test/type_1/13?opType=create' -d '
{
"num" : 14,
"text" : "bar baz"
}
'
# {
# "ok" : true,
# "_index" : "es_test",
# "_id" : "13",
# "_type" : "type_1"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test/type_2/14?opType=create' -d '
{
"num" : 15,
"text" : "bar baz"
}
'
# {
# "ok" : true,
# "_index" : "es_test",
# "_id" : "14",
# "_type" : "type_2"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test_2/type_1/15?opType=create' -d '
{
"num" : 16,
"text" : "bar baz"
}
'
# {
# "ok" : true,
# "_index" : "es_test_2",
# "_id" : "15",
# "_type" : "type_1"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test_2/type_2/16?opType=create' -d '
{
"num" : 17,
"text" : "bar baz"
}
'
# {
# "ok" : true,
# "_index" : "es_test_2",
# "_id" : "16",
# "_type" : "type_2"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test/type_1/17?opType=create' -d '
{
"num" : 18,
"text" : "baz"
}
'
# {
# "ok" : true,
# "_index" : "es_test",
# "_id" : "17",
# "_type" : "type_1"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test/type_2/18?opType=create' -d '
{
"num" : 19,
"text" : "baz"
}
'
# {
# "ok" : true,
# "_index" : "es_test",
# "_id" : "18",
# "_type" : "type_2"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test_2/type_1/19?opType=create' -d '
{
"num" : 20,
"text" : "baz"
}
'
# {
# "ok" : true,
# "_index" : "es_test_2",
# "_id" : "19",
# "_type" : "type_1"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test_2/type_2/20?opType=create' -d '
{
"num" : 21,
"text" : "baz"
}
'
# {
# "ok" : true,
# "_index" : "es_test_2",
# "_id" : "20",
# "_type" : "type_2"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test/type_1/21?opType=create' -d '
{
"num" : 22,
"text" : "bar"
}
'
# {
# "ok" : true,
# "_index" : "es_test",
# "_id" : "21",
# "_type" : "type_1"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test/type_2/22?opType=create' -d '
{
"num" : 23,
"text" : "bar"
}
'
# {
# "ok" : true,
# "_index" : "es_test",
# "_id" : "22",
# "_type" : "type_2"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test_2/type_1/23?opType=create' -d '
{
"num" : 24,
"text" : "bar"
}
'
# {
# "ok" : true,
# "_index" : "es_test_2",
# "_id" : "23",
# "_type" : "type_1"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test_2/type_2/24?opType=create' -d '
{
"num" : 25,
"text" : "bar"
}
'
# {
# "ok" : true,
# "_index" : "es_test_2",
# "_id" : "24",
# "_type" : "type_2"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test/type_1/25?opType=create' -d '
{
"num" : 26,
"text" : "foo baz"
}
'
# {
# "ok" : true,
# "_index" : "es_test",
# "_id" : "25",
# "_type" : "type_1"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test/type_2/26?opType=create' -d '
{
"num" : 27,
"text" : "foo baz"
}
'
# {
# "ok" : true,
# "_index" : "es_test",
# "_id" : "26",
# "_type" : "type_2"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test_2/type_1/27?opType=create' -d '
{
"num" : 28,
"text" : "foo baz"
}
'
# {
# "ok" : true,
# "_index" : "es_test_2",
# "_id" : "27",
# "_type" : "type_1"
# }
curl -XPUT 'http://127.0.0.2:9201/es_test_2/type_2/28?opType=create' -d '
{
"num" : 29,
"text" : "foo baz"
}
'
# {
# "ok" : true,
# "_index" : "es_test_2",
# "_id" : "28",
# "_type" : "type_2"
# }
curl -XPOST 'http://127.0.0.2:9201/_flush?refresh=true'
# {
# "ok" : true,
# "_shards" : {
# "failed" : 0,
# "successful" : 20,
# "total" : 20
# }
# }
curl -XGET 'http://127.0.0.2:9201/_all/_search' -d '
{
"query" : {
"matchAll" : {}
}
}
'
# {
# "hits" : {
# "hits" : [
# {
# "_source" : {
# "num" : 4,
# "text" : "foo"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "3",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 5,
# "text" : "foo"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "4",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 9,
# "text" : "foo bar"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "8",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 21,
# "text" : "baz"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "20",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 3,
# "text" : "foo"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "2",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 7,
# "text" : "foo bar"
# },
# "_index" : "es_test",
# "_id" : "6",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 2,
# "text" : "foo"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "1",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 11,
# "text" : "foo bar baz"
# },
# "_index" : "es_test",
# "_id" : "10",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 22,
# "text" : "bar"
# },
# "_index" : "es_test",
# "_id" : "21",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 10,
# "text" : "foo bar baz"
# },
# "_index" : "es_test",
# "_id" : "9",
# "_type" : "type_1"
# }
# ],
# "total" : 28
# },
# "_shards" : {
# "failed" : 0,
# "successful" : 10,
# "total" : 10
# }
# }
curl -XGET 'http://127.0.0.2:9201/_all/_search' -d '
{
"query" : {
"matchAll" : {}
},
"size" : 100
}
'
# {
# "hits" : {
# "hits" : [
# {
# "_source" : {
# "num" : 5,
# "text" : "foo"
# },
# "_index" : "es_test_2",
# "_id" : "4",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 7,
# "text" : "foo bar"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "6",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 3,
# "text" : "foo"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "2",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 11,
# "text" : "foo bar baz"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "10",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 4,
# "text" : "foo"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "3",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 9,
# "text" : "foo bar"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "8",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 21,
# "text" : "baz"
# },
# "_index" : "es_test_2",
# "_id" : "20",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 2,
# "text" : "foo"
# },
# "_index" : "es_test",
# "_id" : "1",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 6,
# "text" : "foo bar"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "5",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 8,
# "text" : "foo bar"
# },
# "_index" : "es_test_2",
# "_id" : "7",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 12,
# "text" : "foo bar baz"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "11",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 10,
# "text" : "foo bar baz"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "9",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 20,
# "text" : "baz"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "19",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 22,
# "text" : "bar"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "21",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 16,
# "text" : "bar baz"
# },
# "_index" : "es_test_2",
# "_id" : "15",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 23,
# "text" : "bar"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "22",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 14,
# "text" : "bar baz"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "13",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 13,
# "text" : "foo bar baz"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "12",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 18,
# "text" : "baz"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "17",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 24,
# "text" : "bar"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "23",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 17,
# "text" : "bar baz"
# },
# "_index" : "es_test_2",
# "_id" : "16",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 15,
# "text" : "bar baz"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "14",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 19,
# "text" : "baz"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "18",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 25,
# "text" : "bar"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "24",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 26,
# "text" : "foo baz"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "25",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 28,
# "text" : "foo baz"
# },
# "_index" : "es_test_2",
# "_id" : "27",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 27,
# "text" : "foo baz"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "26",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 29,
# "text" : "foo baz"
# },
# "_index" : "es_test_2",
# "_id" : "28",
# "_type" : "type_2"
# }
# ],
# "total" : 28
# },
# "_shards" : {
# "failed" : 0,
# "successful" : 10,
# "total" : 10
# }
# }
curl -XGET 'http://127.0.0.2:9201/_all/_search?searchType=query_then_fetch' -d '
{
"query" : {
"matchAll" : {}
}
}
'
# {
# "hits" : {
# "hits" : [
# {
# "_source" : {
# "num" : 4,
# "text" : "foo"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "3",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 5,
# "text" : "foo"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "4",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 9,
# "text" : "foo bar"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "8",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 21,
# "text" : "baz"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "20",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 3,
# "text" : "foo"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "2",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 7,
# "text" : "foo bar"
# },
# "_index" : "es_test",
# "_id" : "6",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 2,
# "text" : "foo"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "1",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 11,
# "text" : "foo bar baz"
# },
# "_index" : "es_test",
# "_id" : "10",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 22,
# "text" : "bar"
# },
# "_index" : "es_test",
# "_id" : "21",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 10,
# "text" : "foo bar baz"
# },
# "_index" : "es_test",
# "_id" : "9",
# "_type" : "type_1"
# }
# ],
# "total" : 28
# },
# "_shards" : {
# "failed" : 0,
# "successful" : 10,
# "total" : 10
# }
# }
curl -XGET 'http://127.0.0.2:9201/_all/_search?searchType=query_and_fetch' -d '
{
"query" : {
"matchAll" : {}
}
}
'
# {
# "hits" : {
# "hits" : [
# {
# "_source" : {
# "num" : 5,
# "text" : "foo"
# },
# "_index" : "es_test_2",
# "_id" : "4",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 7,
# "text" : "foo bar"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "6",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 3,
# "text" : "foo"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "2",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 11,
# "text" : "foo bar baz"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "10",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 4,
# "text" : "foo"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "3",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 9,
# "text" : "foo bar"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "8",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 21,
# "text" : "baz"
# },
# "_index" : "es_test_2",
# "_id" : "20",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 2,
# "text" : "foo"
# },
# "_index" : "es_test",
# "_id" : "1",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 6,
# "text" : "foo bar"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "5",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 8,
# "text" : "foo bar"
# },
# "_index" : "es_test_2",
# "_id" : "7",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 12,
# "text" : "foo bar baz"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "11",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 10,
# "text" : "foo bar baz"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "9",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 20,
# "text" : "baz"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "19",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 22,
# "text" : "bar"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "21",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 16,
# "text" : "bar baz"
# },
# "_index" : "es_test_2",
# "_id" : "15",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 23,
# "text" : "bar"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "22",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 14,
# "text" : "bar baz"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "13",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 13,
# "text" : "foo bar baz"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "12",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 18,
# "text" : "baz"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "17",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 24,
# "text" : "bar"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "23",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 17,
# "text" : "bar baz"
# },
# "_index" : "es_test_2",
# "_id" : "16",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 15,
# "text" : "bar baz"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "14",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 19,
# "text" : "baz"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "18",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 25,
# "text" : "bar"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "24",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 26,
# "text" : "foo baz"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "25",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 28,
# "text" : "foo baz"
# },
# "_index" : "es_test_2",
# "_id" : "27",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 27,
# "text" : "foo baz"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "26",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 29,
# "text" : "foo baz"
# },
# "_index" : "es_test_2",
# "_id" : "28",
# "_type" : "type_2"
# }
# ],
# "total" : 28
# },
# "_shards" : {
# "failed" : 0,
# "successful" : 10,
# "total" : 10
# }
# }
curl -XGET 'http://127.0.0.2:9201/_all/_search' -d '
{
"query" : {
"term" : {
"text" : "foo"
}
}
}
'
# {
# "hits" : {
# "hits" : [
# {
# "_source" : {
# "num" : 3,
# "text" : "foo"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "2",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 5,
# "text" : "foo"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "4",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 4,
# "text" : "foo"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "3",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 6,
# "text" : "foo bar"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "5",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 9,
# "text" : "foo bar"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "8",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 7,
# "text" : "foo bar"
# },
# "_index" : "es_test",
# "_id" : "6",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 8,
# "text" : "foo bar"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "7",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 26,
# "text" : "foo baz"
# },
# "_index" : "es_test",
# "_id" : "25",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 28,
# "text" : "foo baz"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "27",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 27,
# "text" : "foo baz"
# },
# "_index" : "es_test",
# "_id" : "26",
# "_type" : "type_2"
# }
# ],
# "total" : 16
# },
# "_shards" : {
# "failed" : 0,
# "successful" : 10,
# "total" : 10
# }
# }
curl -XGET 'http://127.0.0.2:9201/_all/_search' -d '
{
"query" : {
"queryString" : {
"defaultField" : "text",
"query" : "foo OR bar"
}
}
}
'
# {
# "hits" : {
# "hits" : [
# {
# "_source" : {
# "num" : 6,
# "text" : "foo bar"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "5",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 8,
# "text" : "foo bar"
# },
# "_index" : "es_test_2",
# "_id" : "7",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 7,
# "text" : "foo bar"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "6",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 9,
# "text" : "foo bar"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "8",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 10,
# "text" : "foo bar baz"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "9",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 11,
# "text" : "foo bar baz"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "10",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 12,
# "text" : "foo bar baz"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "11",
# "_type" : "type_1"
# },
# {
# "_source" : {
# "num" : 13,
# "text" : "foo bar baz"
# },
# "fields" : {},
# "_index" : "es_test_2",
# "_id" : "12",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 3,
# "text" : "foo"
# },
# "fields" : {},
# "_index" : "es_test",
# "_id" : "2",
# "_type" : "type_2"
# },
# {
# "_source" : {
# "num" : 5,
# "text" : "foo"
# },
# "_index" : "es_test_2",
# "_id" : "4",
# "_type" : "type_2"
# }
# ],
# "total" : 24
# },
# "_shards" : {
# "failed" : 0,
# "successful" : 10,
# "total" : 10
# }
# }
curl -XGET 'http://127.0.0.2:9201/_all/_search' -d '
{
"query" : {
"queryString" : {
"defaultField" : "text",
"query" : "foo OR bar"
}
},
"facets" : {
"barFacet" : {
"query" : {
"term" : {
"text" : "bar"
}
}
},
"bazFacet" : {
"query" : {
"term" : {
"text" : "baz"
}
}
}
}
}
'
#500 Server closed connection without sending any data back