I am using the ingest mapper plugin to index PDFs:
POST /index-name
{
"attachment_ID": 1,
"data": "binary-data......",
"type": "attachment"
}
Obviously, the data field is ingested. I am storing only "content".
I then have another document like this:
POST /index-name
{
"type": "blog-post",
"attachments": [
{
"attachment_ID": 1
}
]
}
I need to query the blog post type but have content of the associated attachments affect relevancy. So really I need to subquery the associated attachments to each blog-post. I guess this is a JOIN. I need to query attachments by themselves AS WELL AS blog posts with associated attachments affecting relevancy. My best idea right now is to ingest twice: once under the blog post and one in the attachment document.
Any good solutions to this problem?
