Hi, i'm trying to add a Runtime Field to an index-pattern which will add a new field to each doc as it arrives into the index, the new field is to contain the date/time the doc was added to the index, a field called something like ingested_on.
How do I do this? I understand I need to use a Painless script?
Runtime fields are evaluated at query time and do not add data at index time. It sounds like you instead want to use an ingest pipeline with a set processor that sets the ingested_on field to the current timestamp based on the _ingest.timestamp metadata field. See this example for further details.
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.