Remove/Unmap a field alias

(GBP) #1


I am using Elasticsearch 6.5 to create alias datatypes to fields (

For e.g. I have this mapping

  "mappings": {
    "_doc": {
      "properties": {
        "distance": {
          "type": "long"
        "route_length_miles": {
          "type": "alias",
          "path": "distance" 

Is there a way I can remove/unmap 'route_length_miles' from pointing to 'distance'? When field aliases are created, there doesn't seem to be a way to remove them unless the index itself is deleted (which is not a viable solution)


(Junaid) #2

Unfortunately you'll have to reindex the documents. There isn't any way to delete an existing mapping, you can create a new mapping though using PUT _mapping call.

(GBP) #3

Its pity that it can't be done for aliases though, as the aliases are just pointers to actual fields and can be re-pointed to different fields easily but cannot be unmapped once created.

(system) closed #4

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