Question About Nested Objects Mapping

On the root level of my documents I have an array of objects called entities and for each entity in that array there is a an array of objects called mentions that will contain one or more mentions objects for that entity. I know that I need to map the mentions as type nested to do aggregations, etc, but what about entities? It is at the root level and not nested per se, but will I be able to drill down to the mentions objects without also specifying entities as type nested as well? Any thoughts anyone might have would be appreciated. Thanks.

Kevin

If I understand the question correctly, then you will need to have mentions as a nested type inside entity which in itself is nested.

A sample document would look like:

Doc:

{
  "column1":1,
  "column2":2,
  "column3":3,
  "entity": [
    {
      "entitycolumn1": 11,
      "mention" : [
        {
          "mentionid" : 1,
          "mentioncolumn1" : "a",
          "mentioncolumn2" : "b"
        },
        {
          "mentionid" : 2
          "mentioncolumn1" : "c",
          "mentioncolumn2" : "d"
        }
      ]
    },
    {
       //2nd nested entity document
    }
  ]
}

@Rory thanks for the suggestion, I will give that a try.

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