Skip to content

Instantly share code, notes, and snippets.

@pcdinh
Forked from emedina/testES1.em
Created January 16, 2012 16:29
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 pcdinh/1621643 to your computer and use it in GitHub Desktop.
Save pcdinh/1621643 to your computer and use it in GitHub Desktop.
JSON query
{
"explain" : false,
"from" : 1,
"size" : 10,
"sort" : [ { "_score" : { } } ],
"query" : {
"filtered" : {
"query" : {
"bool" : {
"must" : { "field" : { "_all" : "noche" } },
"must" : { "field" : { "_all" : "horror" } }
}
},
"filter" : {
"bool" : {
"must" : { "term" : { "tienda" : "Casa del Libro" } },
"must" : { "term" : { "categorias1" : "Ocio y cultura" } }
}
}
}
},
"facets" : {
"categorias2" : {
"facet_filter" : {
"term" : { "categorias1" : "Ocio y cultura" }
},
"terms" : { "field" : "categorias2", "size" : 10 }
},
"tienda" : {
"facet_filter" : {
"term" : { "tienda" : "Casa del Libro" }
},
"terms" : { "field" : "tienda", "size" : 10 }
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment