Skip to content

Instantly share code, notes, and snippets.

@justincase
Last active January 3, 2016 04:49
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 justincase/b2efde40e19676df29c7 to your computer and use it in GitHub Desktop.
Save justincase/b2efde40e19676df29c7 to your computer and use it in GitHub Desktop.
Exact array match in elasticsearch. size() -> issue#3094
{
"query" : {
"filtered" : {
"query" : {
"term" : {
"tags" : "foo"
}
},
"filter" : {
"script" : {
"script" : "doc['tags'].values.size() == 1"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment