# Attachment Pipeline Support for Old MS Word and Excel Format

**URL:** <https://discuss.elastic.co/t/attachment-pipeline-support-for-old-ms-word-and-excel-format/290141>\
**Category:** Elasticsearch\
**Created:** [November 25, 2021, 8:24am UTC](https://discuss.elastic.co/t/attachment-pipeline-support-for-old-ms-word-and-excel-format/290141 "2021-11-25T08:24:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Chan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_chan/32/97582_2.png) [@David\_Chan](https://discuss.elastic.co/u/David_Chan)\
**Post date:** [November 25, 2021, 8:24am UTC](https://discuss.elastic.co/t/attachment-pipeline-support-for-old-ms-word-and-excel-format/290141/1 "2021-11-25T08:24:17Z")

</div>

Hi All! I'm uploading a Microsoft Word in .doc format, instead of .docx, to Elasticsearch using attachment pipeline, and I receive the following response.

```auto
{
    "error": {
        "root_cause": [
            {
                "type": "parse_exception",
                "reason": "Error parsing document in field [fileContent]"
            }
        ],
        "type": "parse_exception",
        "reason": "Error parsing document in field [fileContent]",
        "caused_by": {
            "type": "no_such_file_exception",
            "reason": "/tmp/elasticsearch-8583309320442462221/apache-tika-15922682441714930542.tmp"
        }
    },
    "status": 400
}

```

Please advise if there's any limitation for the pipeline or any additional setup is required. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 25, 2021, 8:40am UTC](https://discuss.elastic.co/t/attachment-pipeline-support-for-old-ms-word-and-excel-format/290141/2 "2021-11-25T08:40:04Z")

</div>

Welcome!

That's a weird error.  
Is there a chance you could share your binary document?

Which Elasticsearch version are you using?

---

<div class="post-metadata">

**Author:** ![David\_Chan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_chan/32/97582_2.png) [@David\_Chan](https://discuss.elastic.co/u/David_Chan)\
**Post date:** [November 26, 2021, 12:08am UTC](https://discuss.elastic.co/t/attachment-pipeline-support-for-old-ms-word-and-excel-format/290141/3 "2021-11-26T00:08:23Z")

</div>

The version of my Elasticsearch is 7.12.0, and I installed ingest attachment plugin as introduced at [Ingest Attachment Processor Plugin | Elasticsearch Plugins and Integrations [7.15] | Elastic](https://www.elastic.co/guide/en/elasticsearch/plugins/current/ingest-attachment.html)  
Please find my sample document and the request JSON [here](https://1drv.ms/u/s!ArVC4kxzXJfeiTg2ML7XNiH9p1Yi). Thanks.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 30, 2021, 4:14pm UTC](https://discuss.elastic.co/t/attachment-pipeline-support-for-old-ms-word-and-excel-format/290141/4 "2021-11-30T16:14:23Z")

</div>

So I tried your file with this pipeline:

```auto
PUT _ingest/pipeline/attachment
{
  "description" : "Extract attachment information",
  "processors" : [
    {
      "attachment" : {
        "field" : "fileContent"
      }
    },{
      "remove" : {
        "field" : "fileContent"
      }
    }
  ]
}

```

And then:

```auto
POST /_ingest/pipeline/attachment/_simulate
{
  "docs": [
    {
      "_source": { "fileContent": "BASE64-CONTENT-HERE" }
    }
    ]
}

```

This gave:

```auto
{
  "docs" : [
    {
      "doc" : {
        "_index" : "_index",
        "_type" : "_doc",
        "_id" : "_id",
        "_source" : {
          "attachment" : {
            "date" : "2021-11-25T05:54:00Z",
            "language" : "lt",
            "content_type" : "application/msword",
            "author" : "Chan, David",
            "content" : "abc",
            "content_length" : 4
          }
        },
        "_ingest" : {
          "timestamp" : "2021-11-30T16:11:45.118139599Z"
        }
      }
    }
  ]
}

```

I suspect an error in Tika which might have been upgraded since then.  
I tested on 7.15.1.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 28, 2021, 4:14pm UTC](https://discuss.elastic.co/t/attachment-pipeline-support-for-old-ms-word-and-excel-format/290141/5 "2021-12-28T16:14:53Z")

</div>

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