Skip to content

Instantly share code, notes, and snippets.

@vic
Created November 2, 2013 00:20
Show Gist options
  • Select an option

  • Save vic/7273968 to your computer and use it in GitHub Desktop.

Select an option

Save vic/7273968 to your computer and use it in GitHub Desktop.
foo bar baz
{
"query": {
"bool": {
"must": [
{
"terms": {
"baz_id": [
6
]
}
}
]
}
},
"facets": {
"bar": {
"terms": {
"field": "bar_id"
},
"facet_filter": {
"term": {"baz_id": [6]}
},
"global": true
}
},
"size": 10
}
Foo.tire.search {
query {
boolean {
must { terms :baz_id, [6] }
}
}
facet('bar', global: true) {
terms :bar_id
facet_filter :terms, baz_id: [6]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment