run below steps in Kibana dashboard for manual indexing

Step-1: Create one temp index

1PUT dss-collection_temp

Step-2: take the mappings with below command

1GET dss-collection_v1 2 3Note : only properties object 4ex : 5"mappings": { 6 "general": { 7 "properties": {} 8 } 9} 10

Step-3: modify the fields you want to change the type

1Here i want to change 2"receiptDate": { 3 "type": "long" 4 }, 5to 6"receiptDate" : { 7 "type" : "date", 8 "format" : "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis" 9 },

Step-4: Take the updated mappings and add it for temp index with below command

1PUT dss-collection_temp/_mapping/general 2{add the updated mapping here}

Step-5: Move the data from egov-dss-ingest-enriched to dss-collection_temp with below command

1POST _reindex 2{ 3 "source": { 4 "index": "egov-dss-ingest-enriched" 5 }, 6 "dest": { 7 "index": "dss-collection_temp" 8 } 9}

Step-6:Now the data moved from original index to temp index check the no of record in temp index

1GET dss-collection_temp/_search

Step-7:If the count matching delete the original index with below comand

1DELETE egov-dss-ingest-enriched

Step-8:Create egov-dss-ingest-enriched with below command

1PUT egov-dss-ingest-enriched

Step-9:Take the updated mappings and add it for egov-dss-ingest-enriched index with below command

1PUT egov-dss-ingest-enriched/_mapping/general 2{add the updated mappings here}

Step-10:Take the updated mappings and add it for egov-dss-ingest-enriched index with below command

1POST _reindex 2{ 3 "source": { 4 "index": "dss-collection_temp" 5 }, 6 "dest": { 7 "index": "egov-dss-ingest-enriched" 8 } 9}

Step-11:Give the alias with below command

1POST _aliases 2{ 3 "actions": [ 4 { 5 "add": { 6 "index": "egov-dss-ingest-enriched", 7 "alias": "dss-collection_v1" 8 } 9 } 10 ] 11}