I have 2 new fields added to the index and i want to renidex the old indices to include these two fields. I have a mapping csv file where i have an existing field and corresponding value for two new fields. I want to use this csv and re index the old indices?
can anyone help?
Mapping has meaning to Elasticsearch, so this is harder to parse.
This is confusing as well. A reindex operation doesn't necessarily need anything new to work. If I had to guess at what you're describing, it's that you want to use the elasticsearch input plugin to read your existing index, and then use the values from this csv to somehow convert fields in the old data into two new fields for the target indices? Is this correct?
If so, you should read up on the translate filter plugin, which should allow you to use the csv to accomplish this.
whatever the you guessed was correct and thanks for suggesting logstash translate plugin. I was using ruby filter plugin and written a small code snippet to parse the csv . Translate plugin will do same without any effort.
I have one more question , Can we add two fields from csv or yaml file in a single translate filter block? when i checked i could see the destination is a string and always allows single field.
So i think in my case i need to write two filer blocks?
I have got another option. Storing the multiple fields from translate filter to csv and then use the csv filter to parse it.
below link has the 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.