Searching attachment content with ingest attachment plugin ES 5.2

If you provide a full recreation script it can be easier to help.

How can I replay what you are doing without a script?

As explained in About the Elasticsearch category, provide something like:

DELETE index
PUT index/type/1
{
  "foo": "bar"
}
GET index/type/_search
{
  "query": {
    "match": {
      "foo": "bar"
    }
  }
}

Please try with the minimal settings/mappings/content...
If this forum rejects your post because of the number of characters, you can post your full script on gist.github.com and paste the link here.