Skip to content

Instantly share code, notes, and snippets.

Created February 28, 2011 17:22
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 anonymous/847657 to your computer and use it in GitHub Desktop.
Save anonymous/847657 to your computer and use it in GitHub Desktop.
facet has_child error example
curl -XPUT "http://localhost:9200/err_test_real" -d '{ "mappings" : { "results" : { "_parent" : { "type" : "doc" }}}}'
curl -XPUT "http://localhost:9200/err_test_real/doc/8a08dfb3af854f07b72b04b977f27f2a:81" -d '{ "col" : "some_data", "_id" : "8a08dfb3af854f07b72b04b977f27f2a:81" }'
curl -XPOST "http://localhost:9200/_aliases" -d '{"add" : {"index" : "err_test_real", "alias" : "err_test"}}'
curl -XPUT "http://localhost:9200/err_test/results/8a08dfb3af854f07b72b04b977f27f2a:81?parent=8a08dfb3af854f07b72b04b977f27f2a:81" -d'{ "child_column" : 42, "_id" : "8a08dfb3af854f07b72b04b977f27f2a:81", "_parent" : "8a08dfb3af854f07b72b04b977f27f2a:81" }'
curl -XPOST "http://localhost:9200/err_test/_refresh"
curl -XPOST "http://localhost:9200/err_test/doc/_search?pretty=true" -d '{"query" : { "matchAll" : {}}},
"facets" : {
"results" : {
"filter" : {
"has_child" : {
"type" : "results",
"query" : {
"term" : {"child_column" : 42}
}
}
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment