I am trying to index following file pdf but it fails.
https://drive.google.com/open?id=1KS_ow1mfQKLjv_9zihpkn-No1vq0Z_a7
axios.put(`${ELASTIC_SEARCH_DOC_URL}/_ingest/pipeline/${id}`, {
"description" : "Extract attachment information",
"processors" : [
{
"attachment" : {
"field" : "data",
"indexed_chars": -1,
"ignore_failure": true,
}
}
]
}, {
headers: {
"Content-Type": "application/json"
}
}).then(() => {
const url = `${ELASTIC_SEARCH_DOC_URL}/${ELASTIC_SEARCH_DOC_INDEX}/documents/${id}?pipeline=${id}`
const data = {
data: base64Encode(file),
link: f.link,
tranId: f.tranId,
...f.indexingTags,
}
axios.put(url, data, {
headers: {
"Content-Type": "application/json"
}
}).then((iData) => {
indexedFiles.push(f)
resolve(iData)
}).catch(err => {
fs.appendFileSync(errorFileLogs, `Attachment Pilpeline Failed => ${url}\n${err}\n\n`)
resolve()
})
}).catch(err => {
console.log(err)
fs.appendFileSync(errorFileLogs, `Ingest Pilpeline Failed => \n${err}\n`)
resolve()
})
I was able to successfully index a simple pdf: http://www.africau.edu/images/default/sample.pdf
Can some one guide how can I fix the above issue
Thanks