# How to use wildcard in get Index java api

**URL:** <https://discuss.elastic.co/t/how-to-use-wildcard-in-get-index-java-api/137275>\
**Category:** Elasticsearch\
**Created:** [June 25, 2018, 2:25pm UTC](https://discuss.elastic.co/t/how-to-use-wildcard-in-get-index-java-api/137275 "2018-06-25T14:25:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajesh\_elasticsearch](https://avatars.discourse-cdn.com/v4/letter/r/c6cbf5/32.png) [@rajesh\_elasticsearch](https://discuss.elastic.co/u/rajesh_elasticsearch)\
**Post date:** [June 25, 2018, 2:25pm UTC](https://discuss.elastic.co/t/how-to-use-wildcard-in-get-index-java-api/137275/1 "2018-06-25T14:25:17Z")

</div>

GET logs-\*

To get all the index we using (\_all)  
java api : esClient.admin().indices().prepareStats().all().get().

But if I want to use wildcard ( logs-\* ), I can user Get logs-\* in kibana but how to archive this in JAVA api ?

Thanks in advance.

---

<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 23, 2018, 2:25pm UTC](https://discuss.elastic.co/t/how-to-use-wildcard-in-get-index-java-api/137275/2 "2018-07-23T14:25:23Z")

</div>

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