I have implemented an enrich processor and I am trying to properly format the enrich index’s docs. For example, I have a source index with a nationality and an average height. I want to enrich an index that only contains nationality data with the average height data from the source index. What is currently happening is that in the enrich index, an object of both nationality and height data is set into the “height” data field. Instead of this, I want to format it so only the true height data is set to the “height” field of the enrich data. (Ex “height” : “5.11” instead of “height” : { “nationality” : “…..”, “height” : “5.11” } ). This is all being done in Java. I am wondering if this is possible or if the limitations of the enrich processor makes this unattainable. Thanks!
Thanks for sending in a reply to my question.
I have been trying to implement the rename processor with no success. Here is my implementation in java:
Processor renameProcessor = new Processor.Builder()
.rename(r -> r
.field("height.height")
.targetField("height")
.ignoreMissing(true)
.ignoreFailure(true))
.build();
But the outcome is still not a flat height field. I am creating a pipeline via a PutPipelineRequest object and i specify when i would like my processor to be executed in this declaration, the order is enrichProcessor, scriptProcessor, removeProcessor, renameProcessor. I have tried switching the order with no success. Is there another Processor/alternate implementation that can aid me to accomplish my goal?
Sorry for the late response. Here is some info that will hopefully help you better understand my problem. Here is a simplified example on what mine looks like.
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.