How to use the es.default_index function in es

To help you get started, we’ve selected a few es examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github elastic / kibana / src / core_plugins / timelion / server / routes / validate_es.js View on Github external
handler: async function (request) {
      const uiSettings = await request.getUiSettingsService().getAll();

      const { callWithRequest } = server.plugins.elasticsearch.getCluster('data');

      const timefield = uiSettings['timelion:es.timefield'];

      const body = {
        index: uiSettings['es.default_index'],
        body: {
          aggs: {
            maxAgg: {
              max: {
                field: timefield
              }
            },
            minAgg: {
              min: {
                field: timefield
              }
            }
          },
          size: 0
        }
      };
github elastic / kibana / src / legacy / core_plugins / timelion / server / routes / validate_es.js View on Github external
handler: async function (request) {
      const uiSettings = await request.getUiSettingsService().getAll();

      const { callWithRequest } = server.plugins.elasticsearch.getCluster('data');

      const timefield = uiSettings['timelion:es.timefield'];

      const body = {
        index: uiSettings['es.default_index'],
        body: {
          aggs: {
            maxAgg: {
              max: {
                field: timefield
              }
            },
            minAgg: {
              min: {
                field: timefield
              }
            }
          },
          size: 0
        }
      };