elasticsearch-rs
elasticsearch-rs copied to clipboard
[BUG] Cannot use http transport to connect to docker containers
Describe the bug Because the Transport struct requires urls, you cannot pass the uri of a local docker container, which is a very common use case.
To Reproduce Create an ES node in docker compose like
es:
image: elasticsearch:8.6.0
environment:
- node.name=es
- cluster.name=test
- cluster.initial_master_nodes=es
- bootstrap.memory_lock=true
- xpack.security.enabled=false
mem_limit: 1073741824
ulimits:
memlock:
soft: -1
hard: -1
and try to connect via Transport
let transport = Transport::single_node("es").unwrap();
Expected behavior Transport successfully connects to docker container.