Now, I use SearchGuard to secure my elasticsearch cluster.
And in the search-guard official website, I found the Transport Clients to create A client. But, due to the Elasticsearch official website's declare:
We plan on deprecating the TransportClient in Elasticsearch 7.0 and removing it completely in 8.0. Instead, you should be using the Java High Level REST Client, which executes HTTP requests rather than serialized Java requests.
So I prefer to use Class RestHighLevelClient to create the elasticsearch client!
But in this way, how could I write the code? Could someone provide the demo?
Thanks!
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.