when i start the esClient 1st time it runs fine when i run the program
again it throws exception as below this happens when i specify
mergeSettings="true"
Exception in thread "main"
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'esClient': Invocation of init method failed; nested
exception is org.elasticsearch.ElasticSearchIllegalArgumentException: can't
change the number of shards for an index
how to avoid this error . when should we use mergeSettings="true"
I think I understand. Factory is first trying to create a new index with your settings (3,1) than after a restart tries to update settings but number of shards is immutable.
Could you open an issue in spring-elasticsearch project?
<!-- By default, you will get an Elasticsearch Transport Client connected to an Elasticsearch node already running at localhost:9300 using elasticsearch as cluster name -->
<elasticsearch:client id="esClient" esNodes="localhost:9300" properties="esproperties"
autoscan="false" mappings="twitter/tweet" mergeSettings="true" mergeMapping="true"/>
<util:properties id="esproperties" location="classpath:esclient-transport.properties"/>
when i start the esClient 1st time it runs fine when i run the program again it throws exception as below this happens when i specify mergeSettings="true"
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'esClient': Invocation of init method failed; nested exception is org.elasticsearch.ElasticSearchIllegalArgumentException: can't change the number of shards for an index
how to avoid this error . when should we use mergeSettings="true"
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.