问题
Need to connect to a secure elastic search which has https authentication using Transport client in java code. I have userId and password to connect however need example on how can we do it? I am using elasticsearch 5.6.0.
I was looking for xpack and sheild options but could not make use of them.
回答1:
I used PreBuiltXpackTransportClient and could connect to the secured elastic search server. Refer documentation here.
来源:https://stackoverflow.com/questions/54327118/secure-connection-using-transport-client