'Adding a New field too slow

I want to add a new field to my index which includes more than 20m documents. I have dictionary like this Template : [Catalog_id : {Keyword: Sold Count}]

Sold Counts = {1234: {Apple:50}, 3242: {Banana:20}, 3423: {Apple:23}, ...}

In the index, there are many documents which share the same catalog_id. According to each document's catalog_id, I want to add a new field. _id: 12323423423, catalog_id: 1234, name: '....', **Sold Count: [Apple,50]**

What is the best way to insert a new field in this situtation?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source