I have multiple fields containing the values of the same type (strings). The underlying structure of the division into these fields has changed. So I want to reorganize these fields for better filtering and visualization. I want to create a new scripted field based on one of the old fields. But I also want to exclude some values and add values from the other old field.
Can you please help me with the syntax? I found something like ' doc['field1'].value + '_' + doc['field2'].value '. This action combines my first text value from one field with the first text value from the other field into one but I want to create a new extended field based on old separate values.
I also want to ask how to select exactly those values that I need from the fields. I mean how 'NewField <- field1=="NeededValue1" & field2=="NeededValue2" & field2== "NeededValue3" ' would be in painless?
@Tomo_M yes, I am using keyword type. Could you please provide an example script of how to create a new scripted field containing the values of the two other fields?
And also I don't fully understand what you need. mappings of old fields, whether they are a single value or an array, what will happen if you drop some value (eg. keep ' _ ' or not?), sample input and the desired output for some cases... should be needed. Your script help understanding what you want to do, even if it doesn't work.
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.