control elasticsearch configuration in spring-data setup

十年热恋 提交于 2019-12-12 02:03:58

问题


I startup elasticsearch via XML configuration like this:

<elasticsearch:node-client id="client" local="true"/>

Now I need more control on configuration e.g. setting the index files location. How can I achieve this? Can I pass parameter somehow or do I need to specify a config-file location using environment property -Des.config=?


回答1:


You need to use @Setting(settingPath = "elasticsearch.properties") in your config class and inside the file set the path.data property.

Check my answer here



来源:https://stackoverflow.com/questions/25687545/control-elasticsearch-configuration-in-spring-data-setup

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!