# Cross search with 2 indexes

**URL:** https://discuss.elastic.co/t/cross-search-with-2-indexes/213349
**Category:** Elasticsearch
**Created:** [December 30, 2019, 12:20pm UTC](https://discuss.elastic.co/t/cross-search-with-2-indexes/213349 "2019-12-30T12:20:24Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Seb\_Coyote](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seb_coyote/32/47922_2.png) [@Seb\_Coyote](https://discuss.elastic.co/u/Seb_Coyote)
#### Post date: [December 30, 2019, 12:20pm UTC](https://discuss.elastic.co/t/cross-search-with-2-indexes/213349/1 "2019-12-30T12:20:24Z")

</div>

Hi All,

I have elasticsearch with 2 indexes and Kibana. (import from CSV)  
The first index contain data for different machines like IP address (type:IP).  
The second index contain CIDR and Network name

We want to visualize All machine into a single Network  
I've try make request with IP datatype or foreeach whitout result...

Do you have a idea ?

---

<div class="post-metadata">

### Author: ![Seb\_Coyote](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seb_coyote/32/47922_2.png) [@Seb\_Coyote](https://discuss.elastic.co/u/Seb_Coyote)
#### Post date: [December 30, 2019, 2:02pm UTC](https://discuss.elastic.co/t/cross-search-with-2-indexes/213349/2 "2019-12-30T14:02:42Z")

</div>

I've also try with IP\_range but I can't define "ranges" to check into index.  
An idea ?

---

<div class="post-metadata">

### Author: ![mverbeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mverbeek/32/101709_2.png) [@mverbeek](https://discuss.elastic.co/u/mverbeek)
#### Post date: [December 30, 2019, 2:07pm UTC](https://discuss.elastic.co/t/cross-search-with-2-indexes/213349/3 "2019-12-30T14:07:02Z")

</div>

If I understand correctly you want to do an search on multiple indexes, you could create an alias that points to both of them and then use that to do your searches.

---

<div class="post-metadata">

### Author: ![Seb\_Coyote](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seb_coyote/32/47922_2.png) [@Seb\_Coyote](https://discuss.elastic.co/u/Seb_Coyote)
#### Post date: [December 30, 2019, 2:25pm UTC](https://discuss.elastic.co/t/cross-search-with-2-indexes/213349/4 "2019-12-30T14:25:24Z")

</div>

Thank's for your reply.  
I've try to make index patterns for the both index but it's does'nt work.

INDEX 1 contain multiple IP address (192.168.1.1, 192.168.1.3, 192.168.2.1, 192.168.2.45, ...)  
INDEX 2 contain multiple CIDR range & Network Name (192.168.1.0/24, 192.168.2.0/24, ...)  
I want agregate IP address into CIDR range but from 2 index

192.168.1.0/24

> > > 192.168.1.1  
> > > 192.168.1.3...

192.168.2.0/24

> > > 192.168.2.1  
> > > 192.168.2.45  
> > > ....

---

<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: [January 27, 2020, 2:25pm UTC](https://discuss.elastic.co/t/cross-search-with-2-indexes/213349/5 "2020-01-27T14:25:24Z")

</div>

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