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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
|
---
setup:
- do:
indices.create:
index: test_index
- do:
indices.create:
index: test_idx
- do:
cluster.health:
wait_for_status: yellow
- do:
indices.put_warmer:
index: test_idx
name: test_warmer2
body:
query:
match_all: {}
- do:
indices.put_warmer:
index: test_index
name: test_warmer
body:
query:
match_all: {}
---
"Basic test for warmers":
- do:
indices.get_warmer:
index: test_index
name: test_warmer
- match: {test_index.warmers.test_warmer.source.query.match_all: {}}
- do:
indices.delete_warmer:
index: test_index
name: test_warmer
- do:
indices.get_warmer:
index: test_index
name: test_warmer
- match: { '': {}}
---
"Getting all warmers via /_warmer should work":
- do:
indices.get_warmer: {}
- match: {test_index.warmers.test_warmer.source.query.match_all: {}}
- match: {test_idx.warmers.test_warmer2.source.query.match_all: {}}
---
"Getting warmers for several indices should work using *":
- do:
indices.get_warmer:
index: '*'
name: '*'
- match: {test_index.warmers.test_warmer.source.query.match_all: {}}
- match: {test_idx.warmers.test_warmer2.source.query.match_all: {}}
---
"Getting warmers for several indices should work using _all":
- do:
indices.get_warmer:
index: _all
name: _all
- match: {test_index.warmers.test_warmer.source.query.match_all: {}}
- match: {test_idx.warmers.test_warmer2.source.query.match_all: {}}
---
"Getting all warmers without specifying index should work":
- do:
indices.get_warmer:
name: _all
- match: {test_index.warmers.test_warmer.source.query.match_all: {}}
- match: {test_idx.warmers.test_warmer2.source.query.match_all: {}}
---
"Getting warmers for several indices should work using prefix*":
- do:
indices.get_warmer:
index: test_i*
name: test_w*
- match: {test_index.warmers.test_warmer.source.query.match_all: {}}
- match: {test_idx.warmers.test_warmer2.source.query.match_all: {}}
---
"Getting warmers for several indices should work using comma-separated lists":
- do:
indices.get_warmer:
index: test_index,test_idx
name: test_warmer,test_warmer2
- match: {test_index.warmers.test_warmer.source.query.match_all: {}}
- match: {test_idx.warmers.test_warmer2.source.query.match_all: {}}
---
"Getting a non-existent warmer on an existing index should return an empty body":
- do:
indices.get_warmer:
index: test_index
name: non-existent
- match: { '': {}}
---
"Getting an existent and non-existent warmer should return the existent and no data about the non-existent warmer":
- do:
indices.get_warmer:
index: test_index
name: test_warmer,non-existent
- match: {test_index.warmers.test_warmer.source.query.match_all: {}}
- is_false: test_index.warmers.non-existent
---
"Getting warmer on an non-existent index should return 404":
- do:
catch: missing
indices.get_warmer:
index: non-existent
name: foo
|