Index/Search API's supported content type

Hi,

I was hoping to clarify after reading the question: Elasticsearch and Smile encoded JSON what are the exact "Content-Type" values handled/supported by Elasticsearch Index/Search endpoints in Elasticsearch 6.x?

I assume that both "application/json" and "application/smile" will work fine? Will this also apply of specifying "Accept" header when retrieving a document or doing a search?

A fallow up questions is will Elasticsearch will do automatically conversion for the types? If I will insert a smile encoded document will I be able to retrieve a JSON when doing a query? (this isn't a use case that I wish to pursue, I just would like to know what will be the limitations of choosing one format over another).

The Rest HighLevel client, SearchHit types does not appear to expose the source directly as byte array and the getSourceAsString method appears to assume the content type to be in JSON.

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