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

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:

{
  $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

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}}'

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