codelibs / elasticsearch-dataformat

Excel/CSV/BulkJSON downloads on Elasticsearch.
Apache License 2.0
144 stars 36 forks source link

Missing 6.x requirement on source query #43

Open zixu-zhao opened 6 years ago

zixu-zhao commented 6 years ago

I am using the dataformat@6.1.0, and I met an error when using the source query that is

{"error":{"root_cause":[{"type":"illegal_state_exception","reason":"source and source_content_type parameters are required"}],"type":"illegal_state_exception","reason":"source and source_content_type parameters are required"},"status":500}

I found that source_content_type parameter must also be specified with the media type of the source following the official document.

Could you update the plugin to support this? Thanks.

marevol commented 6 years ago

Did you set source_content_type? Test cases work.

zixu-zhao commented 6 years ago

I tried manually set &source_content_type=application/json and it works. Really appreciate for the reply.

carobaldino commented 4 years ago

Hi! I had the same error and it worked for my adding what you suggested: &source_content_type=application/json