How 'gte', 'gt', 'lte', and 'lt' operators handle millisecond precision?

Could you clarify the precise behavior of Elasticsearch’s range query when dealing with timestamp fields that include milliseconds?

Specifically, I’m interested in understanding how ‘gte’, ‘gt’, ‘lte’, and ‘lt’ operators handle millisecond precision.

“What exactly happens in Elasticsearch range queries when I specify a timestamp with seconds but the field stores milliseconds?”

Is this interpretation of ‘gt’, ‘gte’, ‘lt’, and ‘lte’ operators correct when dealing with timestamp fields in Elasticsearch?"

{
  "query": {
    "range": {
      "@timestamp": {
	"gt": "2023-12-10T10:00:00",  // gte: 2023-12-10T10:00:01.000
        "gte": "2023-12-10T10:00:00",  // gte: 2023-12-10T10:00:00.000
        "lte": "2023-12-10T11:00:00"   //  lte: 2023-12-10T11:00:00.999
        "lt": "2023-12-10T11:00:00"   //  lte:  2023-12-10T10:59:59.999
      }
    }
  }
}

Hi @1Tsw0ld, I think your understanding is correct if you apply second precision. You can compare it with this example: Range - OpenSearch Documentation