Schema example

{
 "mappings": {

  "document": {
    "dynamic": false,
    "properties": {

    "id": {"type": "string", "index": "not_analyzed"},

    "deleted": {"type": "boolean"},

    "source": {"type": "string", "index": "not_analyzed"},

    "author": {"properties": {
      "name": {"type": "string", "index": "not_analyzed"},
      "follower": {"type": "integer"}
    }},

    "like": {"type": "integer"},
    "content": {"type": "string"},
    "date": {"type": "date", "format": "yyyy-MM-dd HH:mm:ss"},

    "media_size": {"type": "long"},
    "media": {"type": "nested", "properties": {

      "image": {"type": "string", "index": "not_analyzed"},

      "label_size": {"type": "long"},
      "label": {"type": "nested", "properties": {

        "name": {"type": "string", "index": "not_analyzed"},
        "entity": {"type": "string", "index": "not_analyzed"},
        "score": {"type":"float"},

        "model": {"properties": {
          "name": {"type": "string", "index": "not_analyzed"},
          "score": {"type":"float"}
        }},

        "color": {"type": "nested", "properties": {
          "name": {"type": "string", "index": "not_analyzed"},
          "score": {"type":"float"}
        }},

        "texture": {"properties": {
          "name": {"type": "string", "index": "not_analyzed"},
          "score": {"type":"float"}
        }},

        "attribute": {"type": "nested", "properties": {
          "name": {"type": "string", "index": "not_analyzed"},
          "score": {"type":"float"}
        }}

      }}
    }}
  }}
}}