there are different ways to achieve this, all have pros and cons depending on what you want to do with the meta data. I assume you don't want to search on it since you want it added to all documents. One was would be to add a keyword field for this and set it to "index":false to save some space, but you would have to add the value for each document for it to show up in the "_source", e.g.
Of course you could also group the two fields under one parent field of type object.
If you don't want to add the same value all over in your input documents, we have a new field type called constant_keyword coming up in the next minor version (7.7) that allows you to define a field with a fixed value per index. If you want to show its value in search hits, you would need to add the field as a docvalue_fields entry in the query, e.g.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.