Open
Description
Hi Miguel,
Thanks a lot for the great course!
Just a quick note: When using the current version of the elasticsearch
Python client (9.0.0
via pip install elasticsearch
), I ran into this error when calling index()
:
BadRequestError(400, 'media_type_header_exception', 'Invalid media-type value on headers [Content-Type, Accept]')
This is due to a stricter requirement in ES 8+??? /9+ to explicitly send "Content-Type": "application/json"
headers.
Your original course code works perfectly with elasticsearch==8.11.0
and elastic-transport==8.17.1
.
Thanks again for your excellent teaching!
Metadata
Metadata
Assignees
Labels
No labels