Skip to content

Instantly share code, notes, and snippets.

@abulhol
Last active February 10, 2016 13:23
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 abulhol/d951aef61c3ff4225306 to your computer and use it in GitHub Desktop.
Save abulhol/d951aef61c3ff4225306 to your computer and use it in GitHub Desktop.
ES Query that returns some empty hits
{ "a" : {
"b" : {
"c": {
"d":{
"first" : [
{"e": {
"f": {
"second" : [
{"message": "Nobody expects the Spanish inquisition!"}
]
}
}
},
{"e": {
"f": null
}
}
]
}
}
}
}
}
"registryactivities" : {
"keyOpened" : null,
¨{
"query": {
"bool": {
"must": [
{
"nested": {
"path": "a.b.c.d.first",
"query": {
"nested": {
"path": "a.b.c.d.first.e.f.second",
"query": {
"bool": {
"filter": [
{
"term": {
"a.b.c.d.first.e.f.second.message": "Nobody expects the Spanish inquisition!"
}
}
]
}
}
}
}
}
}
]
}
},
"inner_hits": {
"kids0": {
"path": {
"a.b.c.d.first": {
"size" : 1,
"_source": false,
"inner_hits": {
"kids0": {
"path": {
"a.b.c.d.first.e.f.second": {
"size" : 1,
"_source": [
"message",
"bla",
"blub"
],
"query": {
"bool": {
"filter": [
{
"term": {
"a.b.c.d.first.e.f.second.message": "Nobody expects the Spanish inquisition!"
}
}
]
}
}
}
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment