Skip to main content

According to the Elastic documentation: "The 'nested' type is a specialised version of the 'object' datatype that allows arrays of objects to be indexed and queried independently of each other." Nested objects allow you to filter on multiple fields within the same objects in arrays.

Is it possible to get the ElasticSearch writer to write the properties as "type : nested", as shown here:
PUT /my_index
{
  "mappings": {
    "blogpost": {
      "properties": {
        "comments": {
          "type": "nested", 
          "properties": {
            "name":    { "type": "string"  },
            "comment": { "type": "string"  },
            "age":     { "type": "short"   },
            "stars":   { "type": "short"   },
            "date":    { "type": "date"    }
          }
        }
      }
    }
  }
}

One quick workaround would be to use an HTTPCaller to `PUT` this mapping before writing to it with the Elasticsearch Writer.

Beyond that, we presently don't have an option to write `nested` fields, but that is certainly within the realm of possibility. Is this an important feature for your use case?


Reply