Problem with index field type when add data to index

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
[2.11.0]

Describe the issue:
I create new index using

curl -X PUT "https://your-opensearch-cluster:9200/indexname" -H 'Content-Type: application/json' -d '
{
  "mappings": {
    "properties": {
      "ENTITY_ID": {
        "type": "text"
      },
      "NAME" : {
        "type": "text"
      }....
    }
  }
}'

But when fill data in that index with ENTITY_ID as integer value from mysql database than below index type converted to long i want to keep as text so is there any method?

Same problem with date type. when any customer DOB is not found than also it’s converted to text.

Hey @himansutecstub

Can I ask how your shipping those log from MySQL to Opensearch?

Using PHP code get data from mysql database, Create array for send data in opensearch & send post data via curl.

Can you show your configuration on that PHP code?