Nested Document - Created with null


I have a nested document and I am using scripted upsert to add nested document. The first entry in the nested document is always an 'null' string value. My input to ES is '{"script_file": "update-messages","scripted_upsert":true,"params":{[some values]},"upsert" : {}}'. The first entry is always a string valued as 'null' and then data is added. So if the first entry into nested document is 'testing with ES', I see 'nulltesting with ES' in ElasticSearch. Any idea what could be causing the nested document to be initialized with a 'null' string?

Thanks in advance for your help.

(Mark Walkom) #2

Can you post the code so we can replicate and see more detail?


I was able to get this to work by removing the scripted_upsert and by providing the default within upsert:{} parameter. Thanks for taking a look.

(system) #4