summaryrefslogtreecommitdiff
path: root/rest-api-spec/test/search/20_default_values.yaml
blob: e8f14340e339c6e30dc80d06daead751f663d3b7 (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
43
---
"Default index":
  - do:
      indices.create:
          index:  test_2
  - do:
      indices.create:
          index:  test_1
  - do:
      index:
          index:  test_1
          type:   test
          id:     1
          body:   { foo: bar }

  - do:
      index:
          index:  test_2
          type:   test
          id:     42
          body:   { foo: bar }

  - do:
      indices.refresh:
        index: [test_1, test_2]

  - do:
      search:
        index: _all
        type:  test
        body:
          query:
            match:
              foo: bar

  - match: {hits.total: 2}
  - match: {hits.hits.0._index: test_1 }
  - match: {hits.hits.0._type:  test   }
  - match: {hits.hits.0._id:    "1"    }

  - match: {hits.hits.1._index: test_2 }
  - match: {hits.hits.1._type:  test   }
  - match: {hits.hits.1._id:    "42"   }