# Dot in field names in ES7.11

**URL:** <https://discuss.elastic.co/t/dot-in-field-names-in-es7-11/269588>\
**Category:** Elasticsearch\
**Created:** [April 8, 2021, 12:06pm UTC](https://discuss.elastic.co/t/dot-in-field-names-in-es7-11/269588 "2021-04-08T12:06:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AneskaFrisbib](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aneskafrisbib/32/86793_2.png) [@AneskaFrisbib](https://discuss.elastic.co/u/AneskaFrisbib)\
**Post date:** [April 8, 2021, 12:06pm UTC](https://discuss.elastic.co/t/dot-in-field-names-in-es7-11/269588/1 "2021-04-08T12:06:39Z")

</div>

Hello,

I currently have the same problem as the one described here : [How to handle dot in field names in ES 7.0](https://discuss.elastic.co/t/how-to-handle-dot-in-field-names-in-es-7-0/176511)

Unfortunately, I can't modify the document field names as suggested in the last update.

Is there any other solution?  
I also read that a setting existed in ES2.4 (mapper.allow\_dots\_in\_name described here : [Dots in field names | Elasticsearch Guide [2.4] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/dots-in-names.html)). What about this setting? Can it still be used?

Thanks in advance for you help!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 8, 2021, 1:05pm UTC](https://discuss.elastic.co/t/dot-in-field-names-in-es7-11/269588/2 "2021-04-08T13:05:31Z")

</div>

Welcome!

Fields with dot in names are automatically converted to objects.

```auto
DELETE test
PUT test
{
  "mappings" : {
    "properties" : {
      "foo.bar" : {
        "type" : "text"
      }
    }
  }
}
POST test/_doc
{
  "foo.bar": "baz"
}
GET test/_mapping

```

Gives:

```auto
{
  "test" : {
    "mappings" : {
      "properties" : {
        "foo" : {
          "properties" : {
            "bar" : {
              "type" : "text"
            }
          }
        }
      }
    }
  }
}

```

> [@AneskaFrisbib](#):
>
> I can't modify the document field names as suggested in the last update.

So you can hopefully change documents on the fly using an ingest pipeline like with a [rename processor](https://www.elastic.co/guide/en/elasticsearch/reference/7.12/rename-processor.html).

Something like:

```auto
PUT _ingest/pipeline/dotreplace
{
  "processors": [
    {
      "dot_expander": {
        "field": "foo.bar"
      }
    },
    {
      "rename": {
        "field": "foo.bar",
        "target_field": "foo_bar"
      }
    },
    {
      "remove": {
        "field": "foo"
      }
    }
  ]
}
DELETE test
PUT test
{
  "settings": {
    "index.default_pipeline": "dotreplace"
  },
  "mappings" : {
    "properties" : {
      "foo_bar" : {
        "type" : "text"
      }
    }
  }
}
PUT test/_doc/1
{
  "foo.bar": "baz"
}
GET test/_doc/1

```

which gives:

```auto
{
  "_index" : "test",
  "_type" : "_doc",
  "_id" : "1",
  "_version" : 1,
  "_seq_no" : 0,
  "_primary_term" : 1,
  "found" : true,
  "_source" : {
    "foo_bar" : "baz"
  }
}

```

---

<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 6, 2021, 1:06pm UTC](https://discuss.elastic.co/t/dot-in-field-names-in-es7-11/269588/3 "2021-05-06T13:06:32Z")

</div>

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