Request contains unrecognized parameters for Search API

That version of the client is not compatible with such an old Elasticsearch version. Have a look at this thread for a similar issue.

You need to either upgrade Elasticsearch to version 7.17 or downgrade the client to something compatible.