# Get Shard Info From Cluster/Nodes/Index

**URL:** <https://discuss.elastic.co/t/get-shard-info-from-cluster-nodes-index/19266>\
**Category:** Elasticsearch\
**Created:** [August 13, 2014, 5:19pm UTC](https://discuss.elastic.co/t/get-shard-info-from-cluster-nodes-index/19266 "2014-08-13T17:19:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElasticSearch\_Users\_](https://avatars.discourse-cdn.com/v4/letter/e/b4bc9f/32.png) [@ElasticSearch\_Users\_](https://discuss.elastic.co/u/ElasticSearch_Users_)\
**Post date:** [August 13, 2014, 5:19pm UTC](https://discuss.elastic.co/t/get-shard-info-from-cluster-nodes-index/19266/1 "2014-08-13T17:19:43Z")

</div>

Hi,

Can I using Cluster API or some other Java way, find the shards that are  
allocated to cluster -\> node -\> index.

I would like to check which shards are deployed to a physical node, and  
query only that shard to find what was indexed on that data.

I would be using a \_routing value, and using this query, I want to check  
which routing value went to which shard.

Thanks,  
Sandeep

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/808f15d3-f552-4fb9-a404-8645faaded79%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/808f15d3-f552-4fb9-a404-8645faaded79%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 13, 2014, 10:17pm UTC](https://discuss.elastic.co/t/get-shard-info-from-cluster-nodes-index/19266/2 "2014-08-13T22:17:20Z")

</div>

The \_cat/shards API will tell you this -

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 14 August 2014 03:19, 'Sandeep Ramesh Khanzode' via elasticsearch \<  
[elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)\> wrote:

> Hi,
> 
> Can I using Cluster API or some other Java way, find the shards that are  
> allocated to cluster -\> node -\> index.
> 
> I would like to check which shards are deployed to a physical node, and  
> query only that shard to find what was indexed on that data.
> 
> I would be using a \_routing value, and using this query, I want to check  
> which routing value went to which shard.
> 
> Thanks,  
> Sandeep
> 
> --  
> 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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/808f15d3-f552-4fb9-a404-8645faaded79%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/808f15d3-f552-4fb9-a404-8645faaded79%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/808f15d3-f552-4fb9-a404-8645faaded79%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/808f15d3-f552-4fb9-a404-8645faaded79%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEM624ZQcMFxNTDN6jTRp4REXRsjTCQgT4ZVkJ%3Dvug%2B9r3K5kA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624ZQcMFxNTDN6jTRp4REXRsjTCQgT4ZVkJ%3Dvug%2B9r3K5kA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Sandeep\_Ramesh\_Khanz](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@Sandeep\_Ramesh\_Khanz](https://discuss.elastic.co/u/Sandeep_Ramesh_Khanz)\
**Post date:** [August 14, 2014, 6:31am UTC](https://discuss.elastic.co/t/get-shard-info-from-cluster-nodes-index/19266/3 "2014-08-14T06:31:15Z")

</div>

Hi Mark,

Thanks, I will check it out. I hope there is a corresponding Java API for  
this.

Sandeep

On Thu, Aug 14, 2014 at 3:47 AM, Mark Walkom [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
wrote:

> The \_cat/shards API will tell you this -  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cat-shards.html)
> 
> Regards,  
> Mark Walkom
> 
> Infrastructure Engineer  
> Campaign Monitor  
> email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
> web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> 
> On 14 August 2014 03:19, 'Sandeep Ramesh Khanzode' via elasticsearch \<  
> [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)\> wrote:
> 
> > Hi,
> > 
> > Can I using Cluster API or some other Java way, find the shards that are  
> > allocated to cluster -\> node -\> index.
> > 
> > I would like to check which shards are deployed to a physical node, and  
> > query only that shard to find what was indexed on that data.
> > 
> > I would be using a \_routing value, and using this query, I want to check  
> > which routing value went to which shard.
> > 
> > Thanks,  
> > Sandeep
> > 
> > --  
> > 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).
> > 
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/808f15d3-f552-4fb9-a404-8645faaded79%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/808f15d3-f552-4fb9-a404-8645faaded79%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/808f15d3-f552-4fb9-a404-8645faaded79%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/808f15d3-f552-4fb9-a404-8645faaded79%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/N-zmiN6AEuI/unsubscribe](https://groups.google.com/d/topic/elasticsearch/N-zmiN6AEuI/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAEM624ZQcMFxNTDN6jTRp4REXRsjTCQgT4ZVkJ%3Dvug%2B9r3K5kA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624ZQcMFxNTDN6jTRp4REXRsjTCQgT4ZVkJ%3Dvug%2B9r3K5kA%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAEM624ZQcMFxNTDN6jTRp4REXRsjTCQgT4ZVkJ%3Dvug%2B9r3K5kA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAEM624ZQcMFxNTDN6jTRp4REXRsjTCQgT4ZVkJ%3Dvug%2B9r3K5kA%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKnM90bqdHPq%3DgOP%3DSBb2qoWP6O2JgZdMXY8xYqMr87cgwsqOQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKnM90bqdHPq%3DgOP%3DSBb2qoWP6O2JgZdMXY8xYqMr87cgwsqOQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:08am UTC](https://discuss.elastic.co/t/get-shard-info-from-cluster-nodes-index/19266/4 "2017-07-06T01:08:42Z")

</div>


