Hi Folks, I am very new to Elastic Stack and am trying to insert a JSON list of JSON API responses to an index from a python script and am getting the error:
elasticsearch.exceptions.RequestError: RequestError(400, 'mapper_parsing_exception', 'date_time_exception: Invalid value for MonthOfYear (valid values 1 - 12): 44')
I have traced this back to the following field in the very nested JSON document:
{'L3&L4 ID': [{'L3': '1234-96E', 'L4': ['']}, {'L30': '1244-93E', 'L40': ['2322-44T', '4544-13Y']}], 'Name': 'Test 20-08 test module '}
path to access that field for context
documents[0]['data'][0]['Levels'][0]
It seems to be the value 2322-44T is being picked up as a date field type but I am lost as to how to map such a nested field to be string.
for clarity I have edited to add that I am using the below to add each json response from the list:
es.index(index='inv', id=str(doc_id), body=line)
Any help would be greatly greatly appreciated, (reposted after masking some data values)
Tommy