summaryrefslogtreecommitdiff
path: root/rest-api-spec/test/update/90_missing.yaml
blob: d51c54cdbd7903450fb086c1ec87a77730698d2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
"Missing document (partial doc)":

  - do:
      catch:      missing
      update:
          index:  test_1
          type:   test
          id:     1
          body:   { doc: { foo: bar } }

  - do:
      update:
          index: test_1
          type:  test
          id:    1
          body:  { doc: { foo: bar } }
          ignore: 404

---
"Missing document (script)":


  - do:
      catch:      missing
      update:
          index:  test_1
          type:   test
          id:     1
          body:
            script: "ctx._source.foo = bar"
            params: { bar: 'xxx' }

  - do:
      update:
          index:  test_1
          type:   test
          id:     1
          ignore: 404
          body:
            script:       "ctx._source.foo = bar"
            params:       { bar: 'xxx' }