Performance of Range queries on Keyword fields

Hello, how is the performance of Range queries on Keyword (string) fields?

The date fields with values in ISO formats [yyyy-MM-dd'T'HH:mm:ss. SSSXXX] are indexed as keyword instead of date.
There is a need to filter the records with date range.

The record count per shard in Prod cluster indexes is a couple of lacs.
Elasticsearch version: 7.10.2

Is it very inefficient compared to the date and long fields? Should we re-index the data with date mappings?

Thanks

Welcome!

You can not really use keyword type for date comparison. You'd better to reindex.

While you are at it, please upgrade as your version is too old.

Thanks.
Range query works on keyword fields with a query like below

{
  "query": {
    "range": {
      "fieldName": {
        "gte": "valueA",
        "lte": "valueB"
      }
    }
  }
}

Is there any documentation/references related to its performance?

My guess is that it's faster with optimized data structures. Here date data type for dates.