# Multiple index search

**URL:** https://discuss.elastic.co/t/multiple-index-search/329180
**Category:** SIEM
**Created:** [April 3, 2023, 8:48am UTC](https://discuss.elastic.co/t/multiple-index-search/329180 "2023-04-03T08:48:29Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Phoenix1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phoenix1/32/116325_2.png) [@Phoenix1](https://discuss.elastic.co/u/Phoenix1)
#### Post date: [April 3, 2023, 8:48am UTC](https://discuss.elastic.co/t/multiple-index-search/329180/1 "2023-04-03T08:48:29Z")

</div>

How to search logs in multiple index, within discover it does not gives option to select multiple indexes in drop down option.

---

<div class="post-metadata">

### Author: ![stephmilovic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephmilovic/32/146835_2.png) [@stephmilovic](https://discuss.elastic.co/u/stephmilovic)
#### Post date: [April 3, 2023, 2:13pm UTC](https://discuss.elastic.co/t/multiple-index-search/329180/2 "2023-04-03T14:13:46Z")

</div>

Hi @Phoenix1. Have you checked out the [documentation on Kibana data views](https://www.elastic.co/guide/en/kibana/master/data-views.html)? I suggest creating a data view with a wildcard index patten:

> - To match multiple sources, use a wildcard (\*). `filebeat-*` matches `filebeat-apache-a`, `filebeat-apache-b`, and so on.

After creating your data view, it will appear in the different data view selectors across the app including in Discover and the Security Solution:

 ![Data views in Discover](https://us1.discourse-cdn.com/elastic/original/3X/2/e/2e48b905e6977777d4a32dd200fbaa7124854b2e.png)  
 ![Data views in Security Solution](https://us1.discourse-cdn.com/elastic/original/3X/1/7/1779b4bebbf1f24002fc0e34255c765513384b19.png)

Please let us know if this solves your issue.

Best,

Steph

---

<div class="post-metadata">

### Author: ![Phoenix1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phoenix1/32/116325_2.png) [@Phoenix1](https://discuss.elastic.co/u/Phoenix1)
#### Post date: [April 3, 2023, 2:45pm UTC](https://discuss.elastic.co/t/multiple-index-search/329180/3 "2023-04-03T14:45:51Z")

</div>

Hi Steph,  
Thanks for your reposne, it seems you are suggesting how to access different logsource types. instead, just see your screen shot where we have to select one or the other index (under drop down)in discover. Let say we have Index1, Index2, Index3 indexes. My question is how to search event/logs in all three in one go ?  
I searched and possible answer could be Index pattern, let me know what you think i still needs to check on this if it is the solution.

---

<div class="post-metadata">

### Author: ![Wave](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wave/32/117242_2.png) [@Wave](https://discuss.elastic.co/u/Wave)
#### Post date: [April 3, 2023, 2:55pm UTC](https://discuss.elastic.co/t/multiple-index-search/329180/4 "2023-04-03T14:55:30Z")

</div>

Just wanted to add that data views are the new name for what index patterns did previously. @Phoenix1 Think the suggested provided by @stephmilovic should work just fine if I'm understanding you right.

---

<div class="post-metadata">

### Author: ![Phoenix1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phoenix1/32/116325_2.png) [@Phoenix1](https://discuss.elastic.co/u/Phoenix1)
#### Post date: [April 3, 2023, 3:06pm UTC](https://discuss.elastic.co/t/multiple-index-search/329180/5 "2023-04-03T15:06:56Z")

</div>

ok, Thanks @stephmilovic and @Wave. Will get this check and inform your guys.  
Thanks for quick support.

---

<div class="post-metadata">

### Author: ![stephmilovic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephmilovic/32/146835_2.png) [@stephmilovic](https://discuss.elastic.co/u/stephmilovic)
#### Post date: [April 3, 2023, 3:43pm UTC](https://discuss.elastic.co/t/multiple-index-search/329180/6 "2023-04-03T15:43:28Z")

</div>

> Let say we have Index1, Index2, Index3 indexes. My question is how to search event/logs in all three in one go ?

First let's clean up the example, index names must be lower case. So adjusting the example to be index1, index2, index3

You can create a data view with a wildcard. `index*` will retrieve the 3 indices you list above. You could also create a data view and explicitly name each index in a comma separated list in the index pattern like `index1,index2,index3`. We generally recommend using a wildcard index pattern so that all future indices matching this naming pattern will be picked up by the data view. Here is what that looks like in the Create data view UI:

 ![Create data view](https://us1.discourse-cdn.com/elastic/original/3X/e/0/e04c8d568803b69808ebbdb0fdf5a5dce75fe4ef.png)

---

<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: [May 1, 2023, 3:43pm UTC](https://discuss.elastic.co/t/multiple-index-search/329180/7 "2023-05-01T15:43:36Z")

</div>

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