Spring Elastic search Configuration in properties


(paul) #1

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.
For more options, visit https://groups.google.com/groups/opt_out.


(David Pilato) #2

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
Have a look as well at:
http://www.elasticsearch.org/guide/en/elasticsearch/client/java-api/current/client.html#transport-client

HTH

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

8 novembre 2013 at 09:24:21, paul (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.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.


(paul) #3

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
Have a look as well at:

http://www.elasticsearch.org/guide/en/elasticsearch/client/java-api/current/client.html#transport-client

HTH

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

8 novembre 2013 at 09:24:21, paul (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 <javascript:>.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #4