NEED HELP......
I am trying to add a an array of dictionaries as a field in existing elastic search cluster. Previously my data looked like this:
"businessBureauId": "3699",
"businessRecordId": "3699",
"businessRecordSource": "gdgtr",
"businessClusterId": "3699",
"businessGeoLocation": "44.05719,-79.37828",
"applicationId": null,
"enterpriseCustomerId": null,
"businessCoreFields": {
"businessName": "wrgrg",
"cleanBusinessName": "trhaha",
"cleanBusinessNameTrigram": ["__m", "_mm", "mm_", "__v", "_vi"],
"cleanBusinessNameSoundex": "M124",
"isFranchise": 0,
"zipLog": 1.0,
"businessTelephoneNumber": "0000000000",
"businessAddress": {
"addressLine1": "ehateya",
"city": "lancaster",
"stateCode": "PA",
"postalCode": "17601",
"countryCode": "USA",
"isAddressActive": true,
"isAddressVacant": false,
"isAddressFormatStandardized": true,
"addressCategory": "Residential",
"isCommercialMailReceivingAgency": false,
"latitude": "44.05719",
"longitude": "-79.37828",
"addressType": "primary address",
"addressId": "erteraehaj"
},
"businessContacts": [
{
"fullName": "mi",
"address": {
"addressLine1": null,
"city": null,
"stateCode": null,
"postalCode": null,
"countryCode": null,
"isAddressActive": true,
"isAddressVacant": false,
"isAddressFormatStandardized": true,
"addressCategory": null,
"isCommercialMailReceivingAgency": false,
"latitude": null,
"longitude": null,
"addressType": null,
"addressId": null
},
"telephoneNumber": null,
"emailAddress": null,
"businessRole": "principal",
"personId": "rthaetha"
}
],
"employeeCount":7,
"formationYear":2018,
"sic4Code":"4444",
"sic4CodeDescription":"nonclassifiable establishments",
"naics6Code":"444444",
"naics6CodeDescription":"Unclassified Establishments",
"annualRevenue":56789,
"annualRevenueRange":"",
"businessReportDate":"2021-01-17",
"lastUpdateDate":"20210630"
},
"businessExtendedFields": {
"businessAddresses": [
{
"addressLine1":"aehjZJ",
"city":"lancaster",
"stateCode":"PA",
"postalCode":"17601",
"countryCode":"USA",
"isAddressActive":true,
"isAddressVacant":false,
"isAddressFormatStandardized": true,
"addressCategory": "Residential",
"isCommercialMailReceivingAgency": false,
"latitude": "44.05719",
"longitude": "-79.37828",
"addressType": "primary address",
"addressId": "fgegege"
}
]
}
}
and the mappings looks like this where I have only defined mappings for 5 fields and I let elastic search to infer mappings for rest of the fields:
"mappings":
{
"properties": {
"businessBureauId": { "type": "keyword" },
"businessGeoLocation": { "type": "geo_point" },
"businessCoreFields.businessName": {
"type": "text",
"fields": {
"soundex": {
"type": "text",
"analyzer": "soundex_analyzer"
},
"trigram": {
"type": "text",
"analyzer": "trigram_tokenizer_analyzer"
}
}
},
"businessCoreFields.businessAddress": { "type": "nested" },
"businessCoreFields.businessContacts": { "type": "nested" }
}
}
Everything until now works fine.
But as soon as I add new field in above json called "businessExecutiveNameCoreFields"
The json starts looking like this:
{
"businessBureauId": "3699",
"businessRecordId": "3699",
"businessRecordSource": "gdgtr",
"businessClusterId": "3699",
"businessGeoLocation": "44.05719,-79.37828",
"applicationId": null,
"enterpriseCustomerId": null,
"businessCoreFields": {
"businessName": "wrgrg",
"cleanBusinessName": "trhaha",
"cleanBusinessNameTrigram": ["__m", "_mm", "mm_", "__v", "_vi"],
"cleanBusinessNameSoundex": "M124",
"isFranchise": 0,
"zipLog": 1.0,
"businessTelephoneNumber": "0000000000",
"businessAddress": {
"addressLine1": "ehateya",
"city": "lancaster",
"stateCode": "PA",
"postalCode": "17601",
"countryCode": "USA",
"isAddressActive": true,
"isAddressVacant": false,
"isAddressFormatStandardized": true,
"addressCategory": "Residential",
"isCommercialMailReceivingAgency": false,
"latitude": "44.05719",
"longitude": "-79.37828",
"addressType": "primary address",
"addressId": "erteraehaj"
},
"businessContacts": [
{
"fullName": "mi",
"address": {
"addressLine1": null,
"city": null,
"stateCode": null,
"postalCode": null,
"countryCode": null,
"isAddressActive": true,
"isAddressVacant": false,
"isAddressFormatStandardized": true,
"addressCategory": null,
"isCommercialMailReceivingAgency": false,
"latitude": null,
"longitude": null,
"addressType": null,
"addressId": null
},
"telephoneNumber": null,
"emailAddress": null,
"businessRole": "principal",
"personId": "rthaetha"
}
],
"employeeCount":7,
"formationYear":2018,
"sic4Code":"4444",
"sic4CodeDescription":"nonclassifiable establishments",
"naics6Code":"444444",
"naics6CodeDescription":"Unclassified Establishments",
"annualRevenue":56789,
"annualRevenueRange":"",
"businessReportDate":"2021-01-17",
"lastUpdateDate":"20210630"
},
"businessExtendedFields": {
"businessAddresses": [
{
"addressLine1":"aehjZJ",
"city":"lancaster",
"stateCode":"PA",
"postalCode":"17601",
"countryCode":"USA",
"isAddressActive":true,
"isAddressVacant":false,
"isAddressFormatStandardized": true,
"addressCategory": "Residential",
"isCommercialMailReceivingAgency": false,
"latitude": "44.05719",
"longitude": "-79.37828",
"addressType": "primary address",
"addressId": "fgegege"
}
]
},
"businessExecutiveNameCoreFields": {
"businessExecName": [
{
"fullName": "michael",
"fullNameTrigram": "__m;_mi;cha;_el",
"fullNameSoundex": "M245"
}
]
}
}
Now when I try to load it in elastic search cluster with same mapping as above, it gives me the following error:
`java.lang.NullPointerException`
I have also tried to give explicit mapping but still gives me same error.
Can anyone help me resolve this issue?