# How to fetch all data from multiple index in single query through spring boot

**URL:** https://discuss.elastic.co/t/how-to-fetch-all-data-from-multiple-index-in-single-query-through-spring-boot/196897
**Category:** Elasticsearch
**Created:** [August 27, 2019, 7:59am UTC](https://discuss.elastic.co/t/how-to-fetch-all-data-from-multiple-index-in-single-query-through-spring-boot/196897 "2019-08-27T07:59:18Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![vishallodha84](https://avatars.discourse-cdn.com/v4/letter/v/9fc29f/32.png) [@vishallodha84](https://discuss.elastic.co/u/vishallodha84)
#### Post date: [August 27, 2019, 7:59am UTC](https://discuss.elastic.co/t/how-to-fetch-all-data-from-multiple-index-in-single-query-through-spring-boot/196897/1 "2019-08-27T07:59:18Z")

</div>

Hi All,

I have multiple indexes like store, sku, listing i want to search content in single query if any data match then get the response.

I tried to check simple output from 2 indexes but its not showing simple query is  
[http://localhost:9200/\_search?q=\*&index=store&index=sku](http://localhost:9200/_search?q=*&index=store&index=sku)

---

<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: [August 27, 2019, 8:12am UTC](https://discuss.elastic.co/t/how-to-fetch-all-data-from-multiple-index-in-single-query-through-spring-boot/196897/2 "2019-08-27T08:12:13Z")

</div>

Welcome!

Try:

```auto
http://localhost:9200/store,sku/_search?q=*

```

Or

```auto
http://localhost:9200/store,sku/_search

```

---

<div class="post-metadata">

### Author: ![vishallodha84](https://avatars.discourse-cdn.com/v4/letter/v/9fc29f/32.png) [@vishallodha84](https://discuss.elastic.co/u/vishallodha84)
#### Post date: [August 27, 2019, 9:34am UTC](https://discuss.elastic.co/t/how-to-fetch-all-data-from-multiple-index-in-single-query-through-spring-boot/196897/3 "2019-08-27T09:34:28Z")

</div>

Hi David,

Thanks for your reply, in this i'm able to see other index but not all indexes from bot, like if i have 10 records in store and 5 in sku then all 10 from store is displaying but only 1 from sku is displaying.

Thanks & Regards  
Vishal Lodha

---

<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: [August 27, 2019, 11:52am UTC](https://discuss.elastic.co/t/how-to-fetch-all-data-from-multiple-index-in-single-query-through-spring-boot/196897/4 "2019-08-27T11:52:45Z")

</div>

Then run:

```
http://localhost:9200/store,sku/_search?size=15
```

---

<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 24, 2019, 11:52am UTC](https://discuss.elastic.co/t/how-to-fetch-all-data-from-multiple-index-in-single-query-through-spring-boot/196897/5 "2019-09-24T11:52:45Z")

</div>

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