[#62,faceting][s]: introduce Facet and FacetList models and use them.

* Conceptual breakthrough on how Faceting and Filtering interact (have updated issue #62 as a result).
This commit is contained in:
Rufus Pollock
2012-03-31 18:06:41 +01:00
parent 905659d86f
commit 3412962a35
4 changed files with 63 additions and 51 deletions

View File

@@ -43,4 +43,11 @@ test('Dataset', function () {
equal(out.fields.length, 2);
});
test('Facet', function () {
var facets = new recline.Model.FacetList();
facets.addFacet('xyz');
equal(1, facets.length);
deepEqual({terms: {field: 'xyz'}}, facets.get('xyz').get('query'));
});
})(this.jQuery);