elasticsearch: dynamic: strict

revision cb1f8c07f85c26a3f297430a498f231a4e56017e

raw

1-create-type.json

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
  "index": "test",
  "mappings": {
    "dynamictest": {
      "dynamic": "strict",
      "properties": {
        "title": {
          "type": "string"
        },
        "sub": {
          "properties": {
            "subtitle": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
raw

2-create-object.json

1
2
3
4
5
6
7
8
{
  "title": "foo",
  "doesnotexist": "bar",
  "sub": {
    "subtitle": "baz",
    "subdoesnotexist": "zzz"
  }
}

History