# Installing jdbc driver for elasticsearch

**URL:** https://discuss.elastic.co/t/installing-jdbc-driver-for-elasticsearch/143553
**Category:** Elasticsearch
**Created:** [August 8, 2018, 3:15pm UTC](https://discuss.elastic.co/t/installing-jdbc-driver-for-elasticsearch/143553 "2018-08-08T15:15:15Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![aliyesami](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@aliyesami](https://discuss.elastic.co/u/aliyesami)
#### Post date: [August 8, 2018, 3:15pm UTC](https://discuss.elastic.co/t/installing-jdbc-driver-for-elasticsearch/143553/1 "2018-08-08T15:15:15Z")

</div>

i am following this document to install the driver but I do not have any maven tool . can I use wget to download the driver and then install it using elasticsearch plugin ?  
if someone can kindly give me a detailed steps on how to install this driver.

[https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-jdbc.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-jdbc.html)

---

<div class="post-metadata">

### Author: ![shanec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shanec/32/4004_2.png) [@shanec](https://discuss.elastic.co/u/shanec)
#### Post date: [August 8, 2018, 4:52pm UTC](https://discuss.elastic.co/t/installing-jdbc-driver-for-elasticsearch/143553/2 "2018-08-08T16:52:40Z")

</div>

Here you go: [https://www.elastic.co/downloads/jdbc-client](https://www.elastic.co/downloads/jdbc-client)

As just a bit more of an FYI, you can find all of our product downloads at [https://www.elastic.co/downloads](https://www.elastic.co/downloads)

---

<div class="post-metadata">

### Author: ![aliyesami](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@aliyesami](https://discuss.elastic.co/u/aliyesami)
#### Post date: [August 10, 2018, 7:14pm UTC](https://discuss.elastic.co/t/installing-jdbc-driver-for-elasticsearch/143553/3 "2018-08-10T19:14:17Z")

</div>

is this driver different from the SQL JDBC driver that is mentioned here?

[https://www.elastic.co/guide/en/elasticsearch/reference/master/sql-jdbc.html](https://www.elastic.co/guide/en/elasticsearch/reference/master/sql-jdbc.html)

---

<div class="post-metadata">

### Author: ![shanec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shanec/32/4004_2.png) [@shanec](https://discuss.elastic.co/u/shanec)
#### Post date: [August 11, 2018, 8:26pm UTC](https://discuss.elastic.co/t/installing-jdbc-driver-for-elasticsearch/143553/4 "2018-08-11T20:26:44Z")

</div>

It's basically the same thing. For the initial release, we had to bundle a few other jars from Elasticsearch that the JDBC driver depends on. The download page there bundles everything up into a single zip file if you intend to drop it in an application that just knows about JDBC. If you're developing something that uses JDBC, you can use Maven and the dependency management to pull in the jars you need.

---

<div class="post-metadata">

### Author: ![aliyesami](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@aliyesami](https://discuss.elastic.co/u/aliyesami)
#### Post date: [August 14, 2018, 2:33pm UTC](https://discuss.elastic.co/t/installing-jdbc-driver-for-elasticsearch/143553/5 "2018-08-14T14:33:43Z")

</div>

I am still struggling to find a complete example on how to use java for CRUD operations in elasticsearch can you please point me to some where?

---

<div class="post-metadata">

### Author: ![shanec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shanec/32/4004_2.png) [@shanec](https://discuss.elastic.co/u/shanec)
#### Post date: [August 14, 2018, 6:29pm UTC](https://discuss.elastic.co/t/installing-jdbc-driver-for-elasticsearch/143553/6 "2018-08-14T18:29:14Z")

</div>

Elasticsearch's SQL is currently read-only. If you're building an app on top of Elasticsearch in Java, I'd recommend using the Java high-level REST client.  
You can find examples for creating/updating/deleting documents in the documentation there: [https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.3/java-rest-high-supported-apis.html](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.3/java-rest-high-supported-apis.html)

---

<div class="post-metadata">

### Author: ![aliyesami](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@aliyesami](https://discuss.elastic.co/u/aliyesami)
#### Post date: [August 14, 2018, 6:52pm UTC](https://discuss.elastic.co/t/installing-jdbc-driver-for-elasticsearch/143553/7 "2018-08-14T18:52:30Z")

</div>

last but not least .. any working examples available?

---

<div class="post-metadata">

### Author: ![shanec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shanec/32/4004_2.png) [@shanec](https://discuss.elastic.co/u/shanec)
#### Post date: [August 14, 2018, 7:02pm UTC](https://discuss.elastic.co/t/installing-jdbc-driver-for-elasticsearch/143553/8 "2018-08-14T19:02:51Z")

</div>

Working examples of SQL or working examples of the REST client?

---

<div class="post-metadata">

### Author: ![aliyesami](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@aliyesami](https://discuss.elastic.co/u/aliyesami)
#### Post date: [August 15, 2018, 7:36pm UTC](https://discuss.elastic.co/t/installing-jdbc-driver-for-elasticsearch/143553/9 "2018-08-15T19:36:48Z")

</div>

working examples of elastic rest client where it shows how to query elasticsearch from a java app.

---

<div class="post-metadata">

### Author: ![shanec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shanec/32/4004_2.png) [@shanec](https://discuss.elastic.co/u/shanec)
#### Post date: [August 15, 2018, 7:47pm UTC](https://discuss.elastic.co/t/installing-jdbc-driver-for-elasticsearch/143553/10 "2018-08-15T19:47:12Z")

</div>

You can find examples of search and the related features at [https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.3/java-rest-high-search.html](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.3/java-rest-high-search.html)

You'll need to initialize the client first: [https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.3/java-rest-high-getting-started-initialization.html](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.3/java-rest-high-getting-started-initialization.html)

So something like the following for a simple search:

```auto
RestHighLevelClient client = new RestHighLevelClient(RestClient.builder(
                    new HttpHost("localhost", 9200, "http")));
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
searchSourceBuilder.query(QueryBuilders.matchAllQuery());            
searchSourceBuilder.aggregation(AggregationBuilders.terms("top_10_states").field("state").size(10));
SearchRequest searchRequest = new SearchRequest();
searchRequest.indices("social-*");
searchRequest.source(searchSourceBuilder);
SearchResponse searchResponse = client.search(searchRequest);

```

---

<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: [September 12, 2018, 7:47pm UTC](https://discuss.elastic.co/t/installing-jdbc-driver-for-elasticsearch/143553/11 "2018-09-12T19:47:13Z")

</div>

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