I'm not a .Net dev so I'm not sure my answer will be accurate or not. If not, it would be great if you could translate your code to a recreation script that we can run in the Kibana dev console.
But, I believe that you are putting the "binary" content in File field and you want to extract the text to Content field.
If so, I believe you should write:
First of all, thank you for your time and your response.
Unfortunatlly it didn't worked. The error only changed
from:
"field [content] not present as part of path [content]"
to:
"field [attachment] not present as part of path [attachment]"
In fact I believe that the following relation is correct, since it works when I map in a 1:1 relation (one Attachment attribute directly in one News class).
.Field(f => f.Content)
.TargetField(f => f.File)
My guess is that I am missing something in the use of the Foreach, since aparently the request is trying to find a path to "attachment" and the Field can't be found. Since there's a field called attachment in the NewsFiles class, maybe the processor is looking on the News class, not on the NewsFiles.
Could you provide a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.
A full reproduction script will help readers to understand, reproduce and if needed fix your problem. Then we can try to translate the solution to the .Net world.
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.