I am using ingest node for processing documents and I am using script processor for processing documents. Now my requirement is to check whether the field exists and based on existence process goes further.
I am using below code but it's not working.
if (ctx.field1) {
// process 1
}else{
// process 2
}
field1 is not present in all document. some of the documents may not have that field.
How can i check whether field exists in current doc or not?
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.