I wonder how to manage connection when using RestHighlevelClient in Java. The old connection is automatically disconnected. So I know that i need to connect and close when i need it. Is this right?
So what is I to be managed as follows?
For example, If i want to search for Search,
- Connect with Elasticsearch
- Run the search command
- Close the connection.