# Query ES through Java or Scala

**URL:** <https://discuss.elastic.co/t/query-es-through-java-or-scala/75087>\
**Category:** Elasticsearch\
**Created:** [February 14, 2017, 6:16pm UTC](https://discuss.elastic.co/t/query-es-through-java-or-scala/75087 "2017-02-14T18:16:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MubashirEbad](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@MubashirEbad](https://discuss.elastic.co/u/MubashirEbad)\
**Post date:** [February 14, 2017, 6:16pm UTC](https://discuss.elastic.co/t/query-es-through-java-or-scala/75087/1 "2017-02-14T18:16:51Z")

</div>

Hello Experts!!  
I am all set with ES connection with java, but I am unaware of the queries working.  
I want sample code or some information that can help me query ES and print out the response.

Just for instance  
I have a ES running, I have the IP and the port number for that, all I need is how to query it?

---

<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 14, 2017, 6:17pm UTC](https://discuss.elastic.co/t/query-es-through-java-or-scala/75087/2 "2017-03-14T18:17:22Z")

</div>

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