I am using elasticsearch for some batch processing.
The general gist of steps involved are:
1 Fetche each document from index A
2 Search index B by filtering data using attributes of document returned in step 1.
3. Process the data returned by 2 to compute a metric "mymetric"
4. Update the document returned in 1 by adding a new field "mymetric"
Now the program is working correctly and I can see updated documents have the new field. The problem is that field mappings do not get updated (I think this is to be expected) and so kibana does not pick up the field.
Do I need to update the mappings each time I decide to add a new field to an existing document or is there another way to somewhat automate this?
I am using Elasticsearch-7.13.2