Closed Jensxy closed 5 years ago
thanks for the issue @Jensxy
will have a look and get back to you soon.
properties
field to define further fields to indexforeach
directive?Yes, I have seen these docs, but how do I apply these things within R using the elastic package? That is my problem.
I think you have to define those things in the body of the request, passed to the body
parameter.
e.g.
{
"description": "do a thing",
"processors": [
{
"foreach": {
"field": "attachments",
"processor": {
"attachment": {
"target_field": "_ingest._value.attachment",
"field": "_ingest._value.data",
"properties": ["title", "name", "author"]
}
}
}
}
]
}
that's not tested, just geussing at what you'nd need. AFAICT I don't think there's any changes needed in this package, but rather you can do through your requst body
Okay, I will try it. Thank you very much.
@Jensxy let me know if you get it to work
I've just created a foreach pipeline and then I used
es_PUT(file.path(url = make_url(es_get_auth()),
index, "doc_1?pipeline=attachment"),
body = body, config = es_cfg)
And my body looks like this
{"name": "test_name",
"place": "test_place",
"attachments" : [
{"filename": "test_filename1",
"data" : "test_data1"},
{"filename": "test_filename2",
"data" : "test_data2"}]}
Then everything works fine :)
great! i'll see if I should add anything to docs to show an example
@Jensxy see new function pipeline_attachment()
and egs
I have created a pipeline within R. Now I want to use the pipeline to index documents with additional fields. I pipeline looks like this
My problem is that I want to index documents with attachments (emails).
So my 2 questions are.