I am using bulk index in elasticsearch-py to add documents that contain nested items in the form of arrays of dictionaries (address in this case):
{'Name': 'Smith, John',
'ID': '3327',
'Nationality': 'English',
'address': [
{
'ID': '5',
'City': 'Milwaukee',
'Latlon': '43.0526,-87.9199',
'State': 'WI'
},
...
]
}
I create a list of actions, one for each document like so:
{
"_index": "myindex",
"_type": "mytype",
"_source": the_doc
}
And then push the actions via helpers.bulk(es, actions)
I want to specify that address is a nested object. Where do I indicate this to ES with elasticsearch-py?