Closed leemthompo closed 8 months ago
Should be good now using
def generate_actions(data):
for idx, entry in enumerate(data, start=0): # Use monotonically increasing IDs starting from 0
yield {
"_index": FLIGHTS_INDEX_NAME,
"_id": idx, # Use the current index as the document ID
"_source": entry
}
Summary:
Related work:
This is a more simplistic approach to https://github.com/elastic/eland/pull/604
Preview in Colab
Visual diff
(Just the opening section — no changes to the actual examples)