Date_histogram_aggs interval always 0

Have java code to build the aggregation and set interval to be "1d", but always get interval:0 in the result query. We are moving from ES2.0 to ES5.5.2, the interval value was "day" in 2.0, now it's "1d". I even print out the interval value and made sure it's "1d" before query execution, but still get "interval" : 0 in actual query and query execution failed.
Here is the query:

ES query {

"from" : 0,

"size" : 100,

"query" : {

"bool" : {

  "must" : [

    {

      "range" : {

        "esLastUpdateTime" : {

          "from" : 1510537538353,

          "to" : 1513129538353,

          "include_lower" : true,

          "include_upper" : true,

          "boost" : 1.0

        }

      }

    },

    {

      "term" : {

        "status" : {

          "value" : "disconnected",

          "boost" : 1.0

        }

      }

    }

  ],

  "disable_coord" : false,

  "adjust_pure_negative" : true,

  "boost" : 1.0

}

},

"aggregations" : {

"date_histogram_aggs" : {

  "date_histogram" : {

    "field" : "esLastUpdateTime",

    "time_zone" : "-08:00",
    "interval" : 0,

    "offset" : 0,

    "order" : {

      "_key" : "asc"

    },

    "keyed" : false,

    "min_doc_count" : 0

  }

}

}

}

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