# Dealing with IPs and the end of mapping types

**URL:** <https://discuss.elastic.co/t/dealing-with-ips-and-the-end-of-mapping-types/225460>\
**Category:** Elasticsearch\
**Created:** [March 27, 2020, 7:31pm UTC](https://discuss.elastic.co/t/dealing-with-ips-and-the-end-of-mapping-types/225460 "2020-03-27T19:31:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![joaociocca](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joaociocca/32/15827_2.png) [@joaociocca](https://discuss.elastic.co/u/joaociocca)\
**Post date:** [March 27, 2020, 7:31pm UTC](https://discuss.elastic.co/t/dealing-with-ips-and-the-end-of-mapping-types/225460/1 "2020-03-27T19:31:03Z")

</div>

So, I've been reading a lot about how the mapping types are "in extinction" and will be gone in 8.x, but I don't understand is how do we deal with searching related to IP types when it's gone.

Maybe there's something about this somewhere I haven't found yet?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 27, 2020, 7:34pm UTC](https://discuss.elastic.co/t/dealing-with-ips-and-the-end-of-mapping-types/225460/2 "2020-03-27T19:34:44Z")

</div>

Document types are being deprecated, not mapping types.

---

<div class="post-metadata">

**Author:** ![joaociocca](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joaociocca/32/15827_2.png) [@joaociocca](https://discuss.elastic.co/u/joaociocca)\
**Post date:** [March 27, 2020, 8:36pm UTC](https://discuss.elastic.co/t/dealing-with-ips-and-the-end-of-mapping-types/225460/3 "2020-03-27T20:36:57Z")

</div>

Did I understand this wrong, then?

> **[Removal of mapping types | Elasticsearch Guide \[8.11\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html)**

> Indices created in Elasticsearch 7.0.0 or later no longer accept a _default_ mapping. Indices created in 6.x will continue to function as before in Elasticsearch 6.x. Types are deprecated in APIs in 7.0, with breaking changes to the index creation, put mapping, get mapping, put template, get template and get field mappings APIs.

I can't seem to make a template that gets accepted when using type IP

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 28, 2020, 1:54am UTC](https://discuss.elastic.co/t/dealing-with-ips-and-the-end-of-mapping-types/225460/4 "2020-03-28T01:54:29Z")

</div>

In earlier Elasticsearch versions documents could be of different types within an index. This started being [deprecated in Elasticsearch 6.0](https://www.elastic.co/blog/removal-of-mapping-types-elasticsearch). Index mappings used to specify the document type, and it is this that is now being removed.

You can see this if you compare the [docs for version 6.8](https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-templates.html) with the [docs for version 7.6](https://www.elastic.co/guide/en/elasticsearch/reference/7.6/indices-templates.html). Note how the level after `mapping` no longer specifies the document type (in this case `_doc`).

---

<div class="post-metadata">

**Author:** ![joaociocca](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joaociocca/32/15827_2.png) [@joaociocca](https://discuss.elastic.co/u/joaociocca)\
**Post date:** [March 28, 2020, 2:56am UTC](https://discuss.elastic.co/t/dealing-with-ips-and-the-end-of-mapping-types/225460/5 "2020-03-28T02:56:52Z")

</div>

hm... I need to find out where I found documentation that made me try this code:

```auto
  "mappings" : {
    "_default_" : {
      "properties": {

```

for what I understood from you explanation, if I remove `_default_` it should work, then...

[edit] oh yeah, it worked! awesome, thanks @Christian_Dahlqvist =D

---

<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:** [April 25, 2020, 2:56am UTC](https://discuss.elastic.co/t/dealing-with-ips-and-the-end-of-mapping-types/225460/6 "2020-04-25T02:56:53Z")

</div>

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