# Two indexes how to filter with different name fields

**URL:** <https://discuss.elastic.co/t/two-indexes-how-to-filter-with-different-name-fields/265095>\
**Category:** Kibana\
**Created:** [February 22, 2021, 5:10pm UTC](https://discuss.elastic.co/t/two-indexes-how-to-filter-with-different-name-fields/265095 "2021-02-22T17:10:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lorenzo\_Allori](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lorenzo_allori/32/78559_2.png) [@Lorenzo\_Allori](https://discuss.elastic.co/u/Lorenzo_Allori)\
**Post date:** [February 22, 2021, 5:10pm UTC](https://discuss.elastic.co/t/two-indexes-how-to-filter-with-different-name-fields/265095/1 "2021-02-22T17:10:08Z")

</div>

Hi there!

I have two different indexes that have different fields name which are actually the same thing:

For example:  
Index 1 has: IPV4\_SRC\_ADDR : "75.72.214.200"  
Index 2 has: source.addr: "75.72.214.200"

I cannot modify the index but I can work on the index pattern. Is there a way that I can create an additional field to filter on to click and get the only results from that ip?

Tried with scripted fields but did not work.

Thanks.

---

<div class="post-metadata">

**Author:** ![Patrick\_Mueller](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/patrick_mueller/32/109425_2.png) [@Patrick\_Mueller](https://discuss.elastic.co/u/Patrick_Mueller)\
**Post date:** [February 22, 2021, 10:39pm UTC](https://discuss.elastic.co/t/two-indexes-how-to-filter-with-different-name-fields/265095/2 "2021-02-22T22:39:01Z")

</div>

Can you modify the index mappings? I think you could use a field alias for this: [Introducing Field Aliases in Elasticsearch | Elastic Blog](https://www.elastic.co/blog/introducing-field-aliases-in-elasticsearch)

---

<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:** [February 23, 2021, 12:09am UTC](https://discuss.elastic.co/t/two-indexes-how-to-filter-with-different-name-fields/265095/3 "2021-02-23T00:09:58Z")

</div>

Not without the suggestion from Patrick, no.

---

<div class="post-metadata">

**Author:** ![Lorenzo\_Allori](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lorenzo_allori/32/78559_2.png) [@Lorenzo\_Allori](https://discuss.elastic.co/u/Lorenzo_Allori)\
**Post date:** [February 24, 2021, 8:27am UTC](https://discuss.elastic.co/t/two-indexes-how-to-filter-with-different-name-fields/265095/4 "2021-02-24T08:27:33Z")

</div>

Hello!

I tried to add it like this:

```auto
PUT ntopng-*/_mapping
{
  "properties": {
    "source.ip": {
      "type": "alias",
      "path": "IPV4_SRC_ADDR"
    }
  }
}

```

Rereshed the index etc, but I coudn't find the field to add it to a visualization (lens). It does not show up even in the discovery view.

Is there a way to find ouy why? Kibana 7.8.0.

n.b. the right name is source.ip non source.addr as stated in first post.

---

<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:** [March 24, 2021, 8:27am UTC](https://discuss.elastic.co/t/two-indexes-how-to-filter-with-different-name-fields/265095/5 "2021-03-24T08:27:34Z")

</div>

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