# Spring Elastic search Configuration in properties

**URL:** <https://discuss.elastic.co/t/spring-elastic-search-configuration-in-properties/14320>\
**Category:** Elasticsearch\
**Created:** [November 8, 2013, 8:24am UTC](https://discuss.elastic.co/t/spring-elastic-search-configuration-in-properties/14320 "2013-11-08T08:24:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![paul1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paul1/32/46819_2.png) [@paul1](https://discuss.elastic.co/u/paul1)\
**Post date:** [November 8, 2013, 8:24am UTC](https://discuss.elastic.co/t/spring-elastic-search-configuration-in-properties/14320/1 "2013-11-08T08:24:16Z")

</div>

_Spring.xml_

\<util:map id="esproperties"\>  
  
\</util:map\>  
\<elasticsearch:client id="esClient" esNodes="${node.addresses}"  
properties="esproperties" /\>

_Properties file entry_  
cluster.name=abccluster

With the above configuration my client is connecting to cluster called  
"abccluster", how is it getting injected, does esClient look for  
"cluster.name" which is like a key word.  
what all other configurations can go into it. Is there some list i can read  
through.

Reagrds  
paul

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 8, 2013, 8:33am UTC](https://discuss.elastic.co/t/spring-elastic-search-configuration-in-properties/14320/2 "2013-11-08T08:33:28Z")

</div>

When esClient is built, we inject properties using something like:

```
    ImmutableSettings.Builder builder = ImmutableSettings.settingsBuilder().put(this.properties);
TransportClient client = new TransportClient(builder.build());

```

So all "elasticsearch" properties can be injected here. "cluster.name" is one of these properties that elasticsearch manage.

You can find some of available properties in elasticsearch.yml file: [https://github.com/elasticsearch/elasticsearch/blob/master/config/elasticsearch.yml](https://github.com/elasticsearch/elasticsearch/blob/master/config/elasticsearch.yml)  
Have a look as well at:  
[http://www.elasticsearch.org/guide/en/elasticsearch/client/java-api/current/client.html#transport-client](http://www.elasticsearch.org/guide/en/elasticsearch/client/java-api/current/client.html#transport-client)

HTH

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

8 novembre 2013 at 09:24:21, paul ([avinashpaul85@gmail.com](mailto:avinashpaul85@gmail.com)) a écrit:

Spring.xml

\<util:map id="esproperties"\>  
  
\</util:map\>  
\<elasticsearch:client id="esClient" esNodes="${node.addresses}" properties="esproperties" /\>

Properties file entry  
cluster.name=abccluster

With the above configuration my client is connecting to cluster called "abccluster", how is it getting injected, does esClient look for "cluster.name" which is like a key word.  
what all other configurations can go into it. Is there some list i can read through.

## Reagrds paul

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![paul1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paul1/32/46819_2.png) [@paul1](https://discuss.elastic.co/u/paul1)\
**Post date:** [November 8, 2013, 9:13am UTC](https://discuss.elastic.co/t/spring-elastic-search-configuration-in-properties/14320/3 "2013-11-08T09:13:57Z")

</div>

Thank you for the quick reply.its clear now that these properties are  
elasticsearch manage.

On Friday, 8 November 2013 14:03:28 UTC+5:30, David Pilato wrote:

> When esClient is built, we inject properties using something like:
> 
> ```
> ImmutableSettings.Builder builder = 
> 
> ```
> 
> ImmutableSettings.settingsBuilder().put(this.properties);  
> TransportClient client = new TransportClient(builder.build());
> 
> So all "elasticsearch" properties can be injected here. "cluster.name" is  
> one of these properties that elasticsearch manage.
> 
> You can find some of available properties in elasticsearch.yml file:  
> [https://github.com/elasticsearch/elasticsearch/blob/master/config/elasticsearch.yml](https://github.com/elasticsearch/elasticsearch/blob/master/config/elasticsearch.yml)  
> Have a look as well at:
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/client/java-api/current/client.html#transport-client)
> 
> HTH
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> 8 novembre 2013 at 09:24:21, paul ([avinas...@gmail.com](mailto:avinas...@gmail.com) \<javascript:\>) a  
> écrit:
> 
> _Spring.xml_
> 
> \<util:map id="esproperties"\>  
>   
> \</util:map\>  
> \<elasticsearch:client id="esClient" esNodes="${node.addresses}"  
> properties="esproperties" /\>
> 
> _Properties file entry_  
> cluster.name=abccluster
> 
> With the above configuration my client is connecting to cluster called  
> "abccluster", how is it getting injected, does esClient look for "  
> cluster.name" which is like a key word.  
> what all other configurations can go into it. Is there some list i can  
> read through.
> 
> ## Reagrds paul
> 
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:08am UTC](https://discuss.elastic.co/t/spring-elastic-search-configuration-in-properties/14320/4 "2017-07-06T02:08:11Z")

</div>


