# Infinite extent for field "times": \[Infinity, -Infinity\] when data size set as 0 or larger than 10000

**URL:** <https://discuss.elastic.co/t/infinite-extent-for-field-times-infinity-infinity-when-data-size-set-as-0-or-larger-than-10000/291775>\
**Category:** Kibana\
**Tags:** vega\
**Created:** [December 14, 2021, 10:16am UTC](https://discuss.elastic.co/t/infinite-extent-for-field-times-infinity-infinity-when-data-size-set-as-0-or-larger-than-10000/291775 "2021-12-14T10:16:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunryan](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@sunryan](https://discuss.elastic.co/u/sunryan)\
**Post date:** [December 14, 2021, 10:16am UTC](https://discuss.elastic.co/t/infinite-extent-for-field-times-infinity-infinity-when-data-size-set-as-0-or-larger-than-10000/291775/1 "2021-12-14T10:16:24Z")

</div>

I am trying to use Vega to plot a scatter drawing, but always get a warning "Infinite extent for field "times": [Infinity, -Infinity]" when I set the data size as 0 or a number larger than 10000.Any help would be appreciated. Below is my code:

```auto
{
  $schema: https://vega.github.io/schema/vega-lite/v2.json
  data: {

    // Get 10000 documents from ES
    url: {
      %context%: true
      %timefield%: BAR_DATE
      index: perf*
      body: {
        size: 0
        _source: [
          BAC_DATE
          BAR_DATE
          ID
          LOT#
          L_OHV_ASS_TIME
          L_OHV_LOAD_TIME
          SRC_MDI
          SRC_BAY
          DES_MDI
          DES_BAY
        ]
      }
    }
    format: {
      property: hits.hits
    } // {"parse": {[datum._source[BAC_DATE]: "utc:'%d %b //%Y %H:%M:%S'"]}
    //}]
  }
  
  // Parse timestamp and copy extension into new variables
  transform: [
    {
      calculate: toDate(datum._source['BAR_DATE'])
      as: time
    }
    {
      fold: [
        _source[L_OHV_ASS_TIME]
      ]
    }
    {
      timeUnit: utcdayhoursminutesseconds
      field: time
      as: times
    }
  ]

  // Draw results as colored circles
  mark: point
  encoding: {
    x: {
      field: times
      maxbins: 50
      type: temporal
      axis: {
        title: null
        labelAngle: 30
      }
    }
    y: {
      field: value
      type: quantitative
      axis: {
        title: null
      }
    }
    color: {
      field: _source[SRC_MDI]
      type: nominal
    }
    tooltip: [
      {
        field: value
        type: quantitative
      }
      {
        field: _source[BAC_DATE]
        type: nominal
      }
      {
        field: _source[LOT#]
        type: nominal
      }
      {
        field: _source[SRC_MDI]
        type: nominal
      }
    ]
  }
}Preformatted text

```

---

<div class="post-metadata">

**Author:** ![sunryan](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@sunryan](https://discuss.elastic.co/u/sunryan)\
**Post date:** [December 14, 2021, 10:25am UTC](https://discuss.elastic.co/t/infinite-extent-for-field-times-infinity-infinity-when-data-size-set-as-0-or-larger-than-10000/291775/2 "2021-12-14T10:25:25Z")

</div>

I have go back to check the reason, find that is because Elasticsearch will maximum return 10000 docs. I am using below code to change the max result window. `curl -H "Content-Type: application/json" -XPUT http://192.168.47.1:9200/filebeat-7.9.1-2021.03.27-000001/_settings -d '{ "index" : { "max_result_window" : 2147483647}}'`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 11, 2022, 10:25am UTC](https://discuss.elastic.co/t/infinite-extent-for-field-times-infinity-infinity-when-data-size-set-as-0-or-larger-than-10000/291775/3 "2022-01-11T10:25:56Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
