[dashboard] Aggregate field does not exist in older samples
@@ -692,7 +692,7 @@ var Collection = function (vm, collection) {
}
self._addObservablesToFacet = function(facet, vm) {
- if (facet.properties.facets_form) { // Only Solr 5+
+ if (facet.properties.facets_form && facet.properties.facets_form.aggregate) { // Only Solr 5+
facet.properties.facets_form.aggregate.metrics = ko.computed(function() {
var _field = self.getTemplateField(facet.widgetType() == 'hit-widget' ? facet.field() : facet.properties.facets_form.field(), self.template.fieldsAttributes());
return self._get_field_operations(_field, facet);
