Hey there,
I'm trying to implement the Ingest Attachment plugin on Elasticsearch 6.8
My goal is to append the document text to an existing index.
This is a sample of my current index
{
"_index": "koha_biblios",
"_type": "data",
"_id": "7289",
"_version": 1,
"_seq_no": 1390,
"_primary_term": 1,
"found": true,
"_source": {
"title": [
"SHIP PERFORMANCE"
]
},
"author": [
"HUGHES, C. N."
],
"itype": [
"MON"
]
}
First I add a new mapping to the existing index
PUT koha_biblios
{
"mappings" : {
"data" : {
"properties" : {
"attachment.data" : {
"type": "text",
"analyzer" : "analyzer_standard"
}
}
}
}
}
Then I create the pipeline
PUT _ingest/pipeline/attachment
{
"description" : "Extract attachment information",
"processors" : [
{
"attachment" : {
"field" : "data",
"indexed_chars" : -1
}
}
]
}
And the when I submit the file to ingest
PUT koha_biblios/data/7289?pipeline=attachment
{
"data": "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0="
}
I lost all the information and get only the document data
{
"_index": "koha_biblios",
"_type": "data",
"_id": "7289",
"_version": 3,
"_seq_no": 11142,
"_primary_term": 1,
"found": true,
"_source": {
"data": "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0=",
"attachment": {
"content_type": "application/rtf",
"language": "ro",
"content": "Lorem ipsum dolor sit amet",
"content_length": 28
}
}
}
Is it possible to append the ingested document instead of replacing all the existing index?
What am I missing?
Best Regards,
Filipe