MapperParsingException - object mapping for [patient] tried to parse field [address] as object, but got EOF, has a concrete value been provided to it


(Matty) #1

INDEX-NAME: patient
INDEX-TYPE: patientinfo
here is my simple mapping json file :

{
"patientinfo": {
"properties": {
"address": {
"type": "nested",
"properties": {
"patient_origin_address": {
"type": "string"

                },
                "patient_current_address": {
                    "type": "string"
                                            
                },
                "patient_old_address": {
                    "type": "string"
                                            
                }
            }
        }
    }
}

}

i found out that I'm putting some string value to the object adress but i don't know which part of my code is causing error.

BulkRequestBuilder brb.add(client.prepareIndex(INDEX_NAME, INDEX_TYPE,
object.get("id").toString()).setSource(map));

one sample of map data

{address={"patient_origin_address":" Model Town 17","patient_current_address":"Condominium One Subang Jaya","patient_old_address":" Sunway Subang Jaya"}, date_of_birth=1981-10-11, globalId=196ad302157add3ad63cd1154e968dfa, last_name=Rehy, id=7, first_name=matty}


(system) #2