Not Able to search data from the ingested PDF

I am using nodejs client (elasticsearch.js) .

I have ingested a PDF into elasticsearch using mapper attachment plugin. .The ingestion was successful. Whenever i am trying to search data from the document (already ingested), nothing is returned.

Here is my code sample:

var fs = require('fs');
var content = fs.readFileSync('DATA', 'utf8');

var base64 = new Buffer(content).toString('base64');

    index: 'files',
    type: 'document',
    body: {
        file_id: '1',
        file: {
            _content: base64
.catch((err) => {
    console.error('Error while creating elasticsearch record', err);

    index: 'files',
    type: 'document',
    body: {
        query: {
            match: {
                message: "makes it easy and affordable"
}, function(error, resp, status){
    if (error) {
    console.log(JSON.stringify(resp) + "  :   SEARCH");

The search.js returns

ll,"hits":[]}}  :   SEARCH

I am a newbie with elastic, can someone guide me to what am i missing here

Mapper attachments plugin has been removed now. Please use ingest attachment processor instead.


I tried with ingest attachment too, but still getting the same result, is there any error with the query if you can check @dadoonet

What does look like a document you have indexed with ingest-attachment?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.