Multi field of type `object` and `nested`

Is it possible to create a field mapping with multi field of type nested? Something like this:

{
  "mappings" : {
    "properties" : {
      "foo" : {
        "type" : "object",
        "fields" : {
          "nested" : {
            "type" : "nested"
          }
        }
      }
    }
  }
}

It is feasible:

{
  "mappings": {
    "properties": {
      "foo": {
        "type": "object",
        "properties": {
          "fields": {
            "properties": {
              "nested": {
                "type": "nested"
              }
            }
          }
        }
      }
    }
  }
}

Thank you for the reply! However, I am struggling a bit to get this to work.

In your suggestion, it seems like it creates a “fields” property under “foo”, if I understand correctly? That is the same key as the key that specifies a multi field (which is “fields”). Is this on purpose?

fields parameter is supported in text field, object field does not have this parameter, you can remove it, like this:

{
  "mappings": {
    "properties": {
      "foo": {
        "type": "object",
        "properties": {
              "nested": {
                "type": "nested"
              }
            }
          }
        }
     
  }
}