okfn/facetview — pull request #24 by omarkhan (2013-03-20 13:10:55+00:00)
Title: Add support for facet filters

This patch allows facet filters to be used in facets, by adding a `facet_filter` object to an entry in the `facets` array. This is slightly different to how facet filters are defined in raw elasticsearch json, but it preserves backward-compatibility.

Example:

$('#facet-view').facetview({
...
facets: [
{
'field': 'document',
'facet_filter': {
'and': [
{'not': {'exists': {'field': 'error.exception'}}},
{'not': {'term': {'duplicate': true}}}
]
},
'display': 'Documents'
}
],
...
});