Issue storing binary fields in 6.2.2

Thanks David.

TBH I'm not sure it's a very good thing to store binaries in elasticsearch.

It's not binary like a jpg. Raw value is actually string longer than 32K. We perform text analysis on this value. Since it's longer than 32K and I need to retrive complete string back, I wasn't able to store it as keyword.

I use two fields one of type text (used for searching) and one binary (for retrieving).

Coming back to your solution, store:true worked with a small test. I also tried storing text string larger than 32K. It worked too. I feel store:true is better option compared to enabling _source. I will try with the real data.

I understand stored fields are slower to retrieve than docvalue fields (What's the difference between "store" and "doc_values" in field properties?). That should be okay.
But does it have any implications on heap utilization compared to doc_values? I don't search, sort, aggregate on binary field.

Thanks
Vinayak