I have a date field that contains a full date: "releaseDate" : { "type" : "date", "format" : "yyyy-MM-dd'T'HH:mm:ssZ" }
I would like to copy the year out of a that field into another field. Is this possible to do at index time?
I realize that I could use 'copy_to' to copy the "releaseDate" into another field that uses a normalizer with a char_filter to strip out the year but the "copy_to" documentation states:
You cannot copy recursively via intermediary fields
When using Elastic version 6.7, I created an ingest pipeline with a given name.
{
"description" : "A pre-processor to handle pulling the release year out of the releaseDate field.",
"processors": [
{
"date": {
"field": "releaseDate",
"target_field": "releaseYear",
"formats": [
"yyyy"
],
"ignore_failure" : true
}
}
]
}
I created a new index that set the default_pipeline to be my created pipeline.
"settings": {
"default_pipeline": "my-pipeline",
When re-indexing the data into the new index, ingest pipeline does not fire and therefore the year field does not get populated. Am I doing something incorrectly?
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.