ElasticSearch Indexing example: TypeError: __init__() missing 1 required positional argument: 'scheme'
MEMBER
Hi, @MoritzLaurer, thanks for reporting.

Normally this is due to a mismatch between the versions of your Elasticsearch client and server:
- your ES client is passing only keyword arguments to your ES server
- whereas your ES server expects a positional argument called 'scheme'

In order to fix this, you should align the major versions of both Elasticsearch client and server.

You can have more info:
- on this other issue page: https://github.com/huggingface/datasets/issues/3956#issuecomment-1072115173
- Elasticsearch client docs: https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/overview.html#_compatibility

Feel free to re-open this issue if the problem persists.

Duplicate of:
- #3956
2022-03-28T07:58:56Z
https://github.com/huggingface/datasets/issues/4027#issuecomment-1080319766
https://api.github.com/repos/huggingface/datasets/issues/4027
IC_kwDODunzps5AZF8W
https://api.github.com/repos/huggingface/datasets/issues/comments/1080319766/reactions
2022-03-28T07:58:56Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1080319766
https://avatars.githubusercontent.com/u/8515462?v=4
https://api.github.com/users/albertvillanova/events{/privacy}
https://api.github.com/users/albertvillanova/followers
https://api.github.com/users/albertvillanova/following{/other_user}
https://api.github.com/users/albertvillanova/gists{/gist_id}
https://github.com/albertvillanova
albertvillanova
MDQ6VXNlcjg1MTU0NjI=
https://api.github.com/users/albertvillanova/orgs
https://api.github.com/users/albertvillanova/received_events
https://api.github.com/users/albertvillanova/repos
https://api.github.com/users/albertvillanova/starred{/owner}{/repo}
https://api.github.com/users/albertvillanova/subscriptions
User
https://api.github.com/users/albertvillanova
public
NONE
1. Check elasticsearch version
```
import elasticsearch
print(elasticsearch.__version__)
```
Ex: 7.9.1
2. Uninstall current elasticsearch package
`pip uninstall elasticsearch`
3. Install elasticsearch 7.9.1 package
`pip install elasticsearch==7.9.1`
2022-04-07T10:29:28Z
https://github.com/huggingface/datasets/issues/4027#issuecomment-1091530766
https://api.github.com/repos/huggingface/datasets/issues/4027
IC_kwDODunzps5BD3AO
https://api.github.com/repos/huggingface/datasets/issues/comments/1091530766/reactions
2022-04-07T10:29:52Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1091530766
https://avatars.githubusercontent.com/u/12517866?v=4
https://api.github.com/users/hoa247/events{/privacy}
https://api.github.com/users/hoa247/followers
https://api.github.com/users/hoa247/following{/other_user}
https://api.github.com/users/hoa247/gists{/gist_id}
https://github.com/hoa247
hoa247
MDQ6VXNlcjEyNTE3ODY2
https://api.github.com/users/hoa247/orgs
https://api.github.com/users/hoa247/received_events
https://api.github.com/users/hoa247/repos
https://api.github.com/users/hoa247/starred{/owner}{/repo}
https://api.github.com/users/hoa247/subscriptions
User
https://api.github.com/users/hoa247
public
## Describe the bug
I am following the example in the documentation for elastic search step by step (on google colab): https://huggingface.co/docs/datasets/faiss_es#elasticsearch

```
from datasets import load_dataset
squad = load_dataset('crime_and_punish', split='train[:1000]')
```

When I run the line: 
`squad.add_elasticsearch_index("context", host="localhost", port="9200")`

I get the error: 
`TypeError: __init__() missing 1 required positional argument: 'scheme'`


## Expected results
No error message

## Actual results

```
TypeError                                 Traceback (most recent call last)

[<ipython-input-23-9205593edef3>](https://localhost:8080/#) in <module>()
      1 import elasticsearch
----> 2 squad.add_elasticsearch_index("text", host="localhost", port="9200")


6 frames

[/usr/local/lib/python3.7/dist-packages/elasticsearch/_sync/client/utils.py](https://localhost:8080/#) in host_mapping_to_node_config(host)
    209         options["path_prefix"] = options.pop("url_prefix")
    210 
--> 211     return NodeConfig(**options)  # type: ignore
    212 
    213 

TypeError: __init__() missing 1 required positional argument: 'scheme'
```

## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.2.0
- Platform: Linux, Google Colab
- Python version: Google Colab (probably 3.7)
- PyArrow version: ?
