UNPKG

kibana-123

Version:

Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elastic

27 lines (22 loc) 613 B
import _ from 'lodash'; // Takes a hit, merges it with any stored/scripted fields, and with the metaFields // returns a flattened version export default function () { let self = this; let scriptFields = {}; let docvalueFields = []; docvalueFields = _.map(_.reject(self.fields.byType.date, 'scripted'), 'name'); _.each(self.getScriptedFields(), function (field) { scriptFields[field.name] = { script: { inline: field.script, lang: field.lang } }; }); return { storedFields: ['*'], scriptFields: scriptFields, docvalueFields: docvalueFields }; };