# ElasticsearchIndexer needs some new property 6.1

**URL:** <https://discuss.elastic.co/t/elasticsearchindexer-needs-some-new-property-6-1/121277>\
**Category:** Elasticsearch\
**Created:** [February 23, 2018, 7:47pm UTC](https://discuss.elastic.co/t/elasticsearchindexer-needs-some-new-property-6-1/121277 "2018-02-23T19:47:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![satyarajp](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@satyarajp](https://discuss.elastic.co/u/satyarajp)\
**Post date:** [February 23, 2018, 7:47pm UTC](https://discuss.elastic.co/t/elasticsearchindexer-needs-some-new-property-6-1/121277/1 "2018-02-23T19:47:10Z")

</div>

Hi Team,

I'm trying to create a class to initialize my elastic indexing.

1. What is the transport type that I can use to run this locally on fresh setup. (Local is no longer supported in 6.1.1)

2. What are the mandatory properties in general on yml. Any sample set would help.

Thank you,  
Regards,  
SatyaRaj

---

<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:** [February 23, 2018, 8:01pm UTC](https://discuss.elastic.co/t/elasticsearchindexer-needs-some-new-property-6-1/121277/2 "2018-02-23T20:01:15Z")

</div>

Did you read: [https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/index.html](https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/index.html)  
?

BTW better to switch to the REST Client.

---

<div class="post-metadata">

**Author:** ![satyarajp](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@satyarajp](https://discuss.elastic.co/u/satyarajp)\
**Post date:** [February 27, 2018, 5:35am UTC](https://discuss.elastic.co/t/elasticsearchindexer-needs-some-new-property-6-1/121277/3 "2018-02-27T05:35:28Z")

</div>

Hi Dadoonet,

Here is the code I'm using

```
String fileloc = ContentStoreConstants.ENV.getString(
					"elasticsearch.config.file.path",
					"D:/etc/myplex/content-store/elasticsearch.yml");
			FileInputStream inputStream = new FileInputStream(fileloc);
			source = IOUtils.toString(inputStream, "utf-8");
			Settings settings = Settings.builder()
					.loadFromSource(source, XContentType.YAML).build();

```

> * * *
> 
> elasticsearch.yml
> 
> path.home: D:\Software\elasticsearch-6.1.1\bin  
> node.name: Local-Client  
> http.port: 9200  
> http.enabled: true  
> discovery.zen.ping.unicast.hosts: ["localhost[9300-9304]"]  
> logger.discovery: TRACE

Also Please suggest me a restclient sample link.

I found the following but still need some sample to convert my snippet above  
[https://artifacts.elastic.co/javadoc/org/elasticsearch/client/elasticsearch-rest-client-sniffer/6.2.2/org/elasticsearch/client/sniff/package-summary.html](https://artifacts.elastic.co/javadoc/org/elasticsearch/client/elasticsearch-rest-client-sniffer/6.2.2/org/elasticsearch/client/sniff/package-summary.html)

Thank you,  
Regards,  
SatyaRaj

---

<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:** [February 27, 2018, 7:05pm UTC](https://discuss.elastic.co/t/elasticsearchindexer-needs-some-new-property-6-1/121277/4 "2018-02-27T19:05:50Z")

</div>

There is no mention in the doc I linked to about anything that look like what you pasted.  
Did you read the documentation I linked to?

About the REST Client, it's there: [https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/index.html](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/index.html)

---

<div class="post-metadata">

**Author:** ![satyarajp](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@satyarajp](https://discuss.elastic.co/u/satyarajp)\
**Post date:** [March 1, 2018, 7:30am UTC](https://discuss.elastic.co/t/elasticsearchindexer-needs-some-new-property-6-1/121277/5 "2018-03-01T07:30:42Z")

</div>

Hi Dadoonet,

finally I'm able to figure out, the `InetSocketTransportAddress` is causing this.  
Followed the example as it is instead of using yml. Following are the properties I used.

```
.put("cluster.name", "elasticsearch")
					.put("path.home","D:\\Software\\elasticsearch-5.6.0\\bin")
					.put("transport.type","local")
					.put("http.enabled","false")
					.build();

```

Thank you,  
Regards,  
SatyaRaj

---

<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:** [March 29, 2018, 7:30am UTC](https://discuss.elastic.co/t/elasticsearchindexer-needs-some-new-property-6-1/121277/6 "2018-03-29T07:30:44Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
