# Need advice - what's the difference between mapping and index pattern?

**URL:** <https://discuss.elastic.co/t/need-advice-whats-the-difference-between-mapping-and-index-pattern/211802>\
**Category:** Kibana\
**Created:** [December 13, 2019, 2:22pm UTC](https://discuss.elastic.co/t/need-advice-whats-the-difference-between-mapping-and-index-pattern/211802 "2019-12-13T14:22:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Skeeve](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@Skeeve](https://discuss.elastic.co/u/Skeeve)\
**Post date:** [December 13, 2019, 2:22pm UTC](https://discuss.elastic.co/t/need-advice-whats-the-difference-between-mapping-and-index-pattern/211802/1 "2019-12-13T14:22:29Z")

</div>

I think I'm a bit lost here.

I created an index with a mapping:

```auto
PUT /ip-owner
{
  "mappings" : {
    "properties" : {
      "ip_addr": {
        "type": "ip"
      },
      "customer_number" : {
        "type" : "text",
        "fields" : {
          "keyword" : {
            "type" : "keyword",
            "ignore_above" : 256
          }
        }
      },
      "dumptime" : {
        "type" : "date"
      },
      "delisted" : {
        "type" : "boolean"
      },
      "domain" : {
        "type" : "text",
        "fields" : {
          "keyword" : {
            "type" : "keyword",
            "ignore_above" : 256
          }
        }
      },
      "host" : {
        "type" : "text",
        "fields" : {
          "keyword" : {
            "type" : "keyword",
            "ignore_above" : 256
          }
        }
      },
      "ip_status" : {
        "type" : "text",
        "fields" : {
          "keyword" : {
            "type" : "keyword",
            "ignore_above" : 256
          }
        }
      },
      "tenant_name" : {
        "type" : "text",
        "fields" : {
          "keyword" : {
            "type" : "keyword",
            "ignore_above" : 256
          }
        }
      }
    }
  }
}

```

I can successfully import my data. But now my misunderstanding/newbieness kicks in. I defined a mapping where I define for example that "ip" is of type `ip`. If I create an index pattern now, "ip" becomes a string.

Which part am I missing? what do I need to do in order for my mapping be reflected in the index pattern?

---

<div class="post-metadata">

**Author:** ![Skeeve](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@Skeeve](https://discuss.elastic.co/u/Skeeve)\
**Post date:** [December 13, 2019, 2:44pm UTC](https://discuss.elastic.co/t/need-advice-whats-the-difference-between-mapping-and-index-pattern/211802/2 "2019-12-13T14:44:52Z")

</div>

Sorry… I think I got it…

My field was labeld "ip" while I defined a field "ip\_addr"…

Stupid mistake…

---

<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 10, 2020, 2:49pm UTC](https://discuss.elastic.co/t/need-advice-whats-the-difference-between-mapping-and-index-pattern/211802/3 "2020-01-10T14:49:34Z")

</div>

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