Skip to content

Instantly share code, notes, and snippets.

View mattmontgomery's full-sized avatar

Matt Montgomery mattmontgomery

View GitHub Profile

Aerial battles prove once again to be RSL's Achilles Heel.

Whether it was anxiety or just the wrong boots, it seemed that Real Salt Lake players hardly left the ground - for the entire 90 minutes it appeared as if RSL have had weights tied around their ankles.

RSL's defense is like a rock.

Winning 57 percent of all duels and owning 54 percent of possession, Sporting was unable to turn their 12-4 edge in shots into a tally on the score sheet.

Filling the right wing

Creating a generic widget

  • Widget file (/js/lib/cms/tile/views/widgets/api/...)
  • Details panel (as above, as panel.details.js)
  • Collection (/js/lib/cms/collections/utah/{collectionName}/collection.js)
  • Model (/js/lib/cms/collections/utah/{collectionName}/model.js)

Aggregations

Can replace faceting (facets api deprecated in ES). Lots of options.

  • min aggregation
  • max aggregation
  • sum aggregation
  • avg aggregation
  • stats aggregation
  • extended stats aggregation
@mattmontgomery
mattmontgomery / gist:05d151bb9d1093630130
Created November 10, 2014 17:23
ElasticsearchController additions

ElasticSearchController:23 - add constant type for FIELD_ARRAY_ALL

ElasticSearchController:91 - add check to getFieldTypeByValue for comma-separated strings

ElasticSearchController:191 - add explode toon FIELD_ARRAY_ALL and comma

ElasticSearchController:134,152 - add option for $should to equal "must" if getFieldTypeByValue is FIELD_ARRAY_ALL

@mattmontgomery
mattmontgomery / Search select augment.js
Created November 5, 2014 21:26
Augmenting search select for resourceMethod and resourceData
define(function(require) {
var $ = require('jQuery'),
_ = require('Underscore'),
Backbone = require('Backbone'),
Tile = require('Tile'),
Flexer = require('tile!layouts/flexer'),
Dropdown = require('tile!cmslayouts/dropdown-input'),
CMSCollection = require('cmshelpers/collection'),
Dropzone = require('tile!cmslayouts/dropzone'),
KeyNavigator = require('keynavigator');