[#57,backend,refactor][s]: create a recline.Backend.Base model which other backends inherit from.
* At the moment this added little other than a cleaner structure but will help with change for #57.
This commit is contained in:
@@ -19,7 +19,7 @@ this.recline.Backend = this.recline.Backend || {};
|
||||
// localhost:9200 with index twitter and type tweet it would be
|
||||
//
|
||||
// <pre>http://localhost:9200/twitter/tweet</pre>
|
||||
my.ElasticSearch = Backbone.Model.extend({
|
||||
my.ElasticSearch = my.Base.extend({
|
||||
_getESUrl: function(dataset) {
|
||||
var out = dataset.get('elasticsearch_url');
|
||||
if (out) return out;
|
||||
@@ -39,7 +39,7 @@ this.recline.Backend = this.recline.Backend || {};
|
||||
dataType: 'jsonp'
|
||||
});
|
||||
var dfd = $.Deferred();
|
||||
my.wrapInTimeout(jqxhr).done(function(schema) {
|
||||
this._wrapInTimeout(jqxhr).done(function(schema) {
|
||||
// only one top level key in ES = the type so we can ignore it
|
||||
var key = _.keys(schema)[0];
|
||||
var fieldData = _.map(schema[key].properties, function(dict, fieldName) {
|
||||
|
||||
Reference in New Issue
Block a user