Trousers

{"$type":"com.ensuant.type.List","$value":[]}
/*return list of filters*/ function(options){ return [{ term: { List: options.page } }, { term: { EnabledInStores: options.storefront } }, { term: { hasWebProfileMedia: 'T' } }]; }
/*return selected fields*/ function(options){ return [{ "Position" : {"order" : "asc"}}]; }
/*return selected fields*/ function(options){ return { "productBrandURI": { "terms": { "field": "productBrandURI", "size": 30 } }, "classURI": { "terms": { "field": "classURI", "size": 30 }, "aggregations": { "categoryURI": { "terms": { "field": "categoryURI", "size": 30, "order": { "_term": "asc" } } } } }, "compositions": { "terms": { "field": "compositions", "size": 30 } }, "color": { "terms": { "field": "color", "size": 30 } }, "categoryURI": { "terms": { "field": "categoryURI", "size": 30 }, "aggregations": { "size": { "terms": { "field": "size", "size": 30, "order": { "_term": "asc" } } } } } }; }