[scriptedFields] use the comprehensive syntax for compat
This commit is contained in:
parent
d1387c7fbc
commit
2486b1d76e
|
@ -56,8 +56,10 @@ export default function FieldAggParamFactory(Private) {
|
|||
var field = aggConfig.params.field;
|
||||
|
||||
if (field.scripted) {
|
||||
output.params.script = field.script;
|
||||
output.params.lang = field.lang;
|
||||
output.params.script = {
|
||||
script: field.script,
|
||||
lang: field.lang,
|
||||
};
|
||||
} else {
|
||||
output.params.field = field.name;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,12 @@ export default function () {
|
|||
fielddataFields = _.pluck(self.fields.byType.date, 'name');
|
||||
|
||||
_.each(self.getScriptedFields(), function (field) {
|
||||
scriptFields[field.name] = { script: field.script, lang: field.lang };
|
||||
scriptFields[field.name] = {
|
||||
script: {
|
||||
script: field.script,
|
||||
lang: field.lang
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
return {
|
||||
|
|
Loading…
Reference in a new issue