I am trying to copy data from my old elastic to a new elastic. So, I was copy the mapping and setting of the index.
{"mappings":{"profile":{"properties":{"Address":{"type":"text","analyzer":"default_analyzer"},"CandidateGuid":{"type":"keyword"},"CandidateId":{"type":"integer"},"City":{"type":"text","analyzer":"default_analyzer"},"ClientCanId":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"Country":{"type":"text","analyzer":"default_analyzer"},"CreatedById":{"type":"long"},"CreatedDate":{"type":"date"},"CurrentCompany":{"type":"text","analyzer":"default_analyzer"},"Email":{"type":"text","analyzer":"url_email_analyzer"},"FirstName":{"type":"text","analyzer":"default_analyzer"},"IndexedDate":{"type":"date"},"IsIndexed":{"type":"long"},"IsParsed":{"type":"long"},"LastName":{"type":"text","analyzer":"default_analyzer"},"LastUpdate":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"LastUpdated":{"type":"date"},"LastUpdatedDate":{"type":"date"},"Location":{"type":"text","analyzer":"default_analyzer"},"LocationAccuracy":{"type":"short"},"Mobile":{"type":"text","analyzer":"default_analyzer"},"ModifiedDate":{"type":"date"},"OrgId":{"type":"integer"},"Parsed":{"properties":{"Company":{"type":"text","analyzer":"default_analyzer"},"Country":{"type":"text","analyzer":"default_analyzer"},"Educations":{"properties":{"Degree":{"type":"text","analyzer":"default_analyzer"},"From":{"type":"date"},"To":{"type":"date"},"University":{"type":"text","analyzer":"default_analyzer"}}},"Emails":{"type":"text","analyzer":"url_email_analyzer"},"Experiences":{"properties":{"Company":{"type":"text","analyzer":"default_analyzer"},"From":{"type":"date"},"Location":{"type":"text","analyzer":"default_analyzer"},"Summary":{"type":"text","analyzer":"default_analyzer"},"Title":{"type":"text","analyzer":"default_analyzer"},"To":{"type":"date"}}},"FirstName":{"type":"text","analyzer":"default_analyzer"},"FullName":{"type":"text","analyzer":"default_analyzer"},"Guid":{"type":"keyword"},"HighestDegree":{"type":"text","analyzer":"default_analyzer"},"Industry":{"type":"text","analyzer":"default_analyzer"},"LastName":{"type":"text","analyzer":"default_analyzer"},"Location":{"type":"text","analyzer":"default_analyzer"},"Name":{"type":"text","analyzer":"default_analyzer"},"Phones":{"type":"text","analyzer":"default_analyzer"},"PostalCode":{"type":"text","analyzer":"default_analyzer"},"RecentExperience":{"type":"text","analyzer":"default_analyzer"},"Skills":{"type":"text","analyzer":"default_analyzer"},"Title":{"type":"text","analyzer":"default_analyzer"},"YearsOfExperience":{"type":"short"},"cities":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"coordinates":{"properties":{"lat":{"type":"float"},"lon":{"type":"float"}}},"countries":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"stateNames":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"states":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"Phone":{"type":"text","analyzer":"default_analyzer"},"Qualification":{"type":"text","analyzer":"default_analyzer"},"ResumeName":{"type":"keyword"},"ResumeText":{"type":"text","analyzer":"special_char_analyzer"},"State":{"type":"text","analyzer":"default_analyzer"},"Title":{"type":"text","analyzer":"special_char_analyzer"},"TotalExperience":{"type":"short"},"ZipCode":{"type":"text","analyzer":"default_analyzer"},"Zipcode":{"type":"text","analyzer":"default_analyzer"},"cities":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}},"analyzer":"default_analyzer"},"coordinates":{"type":"geo_point"},"countries":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}},"analyzer":"default_analyzer"},"locationAccuracy":{"type":"short"},"stateNames":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}},"analyzer":"default_analyzer"},"states":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}},"analyzer":"default_analyzer"},"zips":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}},"analyzer":"default_analyzer"}}}}}
when I tried to PUT on //localhost:9200/profiles through a postman call, I am getting error as
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "analyzer [default_analyzer] not found for field [stateNames]"
}
],
"type": "mapper_parsing_exception",
"reason": "Failed to parse mapping [profile]: analyzer [default_analyzer] not found for field [stateNames]",
"caused_by": {
"type": "mapper_parsing_exception",
"reason": "analyzer [default_analyzer] not found for field [stateNames]"
}
},
"status": 400
}
when I was checking with the error, mostly there are issue with the json file. but I just copied it from the older elastic. The versions of old and newer elastic are same and its 5.3.3.
what could be the possible wrong.?