Initially I was looking for a way to add component and index templates via the new java-client. Then I stumbled upon the following two methods:
ElasticsearchIndicesClient.getTemplate
ElasticsearchIndicesClient.getIndexTemplate
both of their documentation links send me to the the Index-Template page.
Can you explain the difference of those two methods?
Anyhow, the component template is defined in the cluster namespace.
Back to my main problem: With the HLRC I was able to read a JSON from disk, defining the component or index template. But I can't seem to find it. In one Test I found this method - is this the preferred way?
Regarding loading JSON from disk, this is indeed a way to do it. Be aware though that it may not work for requests that have a required path parameter, such as index creation. We have recently added a feature that allows reading any object from JSON and will be in the next minor releases.
I read the second link, but I need it for the IndexTemplate and ComponentTemplate to read from JSON, so I guess the pull request, if this includes those configuration classes, should be perfect.
I'll go w/ the way in the Test class for now, and switch to the other one as soon as it's available.
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.