When field _index in elasticsearch is generated?

in elasticsearch, there is a field named _index, is this field generated by logstash?
In logstash we output same data to both elasticsearch and mongodb, while elasticsearch has a field named _index, but mongodb has no such field, how can we get the value of this field and output to mongodb?

The meta field _index is created in Elastic but the value is the name of the index. So if you know the name of the index you are sending to Elastic you should be able to use that for MongoDB.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.