Question:
How do I use Ealsticsearch API to populate @timestamp and @version as part of the elasticsearch documentation when importing json file?
More information:
In our ELK development process, we are using two different approaches to importing data into Elasticsearch:
- Importing log files through Logstash
- Importing json files through a customized python script using Elasticsearch API
When importing log files using Logstash, we can specify in the Logstash configuration file whether to populate @timestamp and @version and so on when populating the document in Elasticsearch.
When importing json through a python script using elasticsearch, @timestamp and @version are not populated. What API command should we use here?
Thank you.
Regards,
Nars