Make PUT and DELETE consistent for _mapping, _alias and _warmer
See issue #4071
PUT options for _mapping:
Single type can now be added with
`[PUT|POST] {index|_all|*|regex|blank}/[_mapping|_mappings]/type`
and
`[PUT|POST] {index|_all|*|regex|blank}/type/[_mapping|_mappings]`
PUT options for _warmer:
PUT with a single warmer can now be done with
`[PUT|POST] {index|_all|*|prefix*|blank}/{type|_all|*|prefix*|blank}/[_warmer|_warmers]/warmer_name`
PUT options for _alias:
Single alias can now be PUT with
`[PUT|POST] {index|_all|*|prefix*|blank}/[_alias|_aliases]/alias`
DELETE options _mapping:
Several mappings can be deleted at once by defining several indices and types with
`[DELETE] /{index}/{type}`
`[DELETE] /{index}/{type}/_mapping`
`[DELETE] /{index}/_mapping/{type}`
where
`index= * | _all | glob pattern | name1, name2, …`
`type= * | _all | glob pattern | name1, name2, …`
Alternatively, the keyword `_mapings` can be used.
DELETE options for _warmer:
Several warmers can be deleted at once by defining several indices and names with
`[DELETE] /{index}/_warmer/{type}`
where
`index= * | _all | glob pattern | name1, name2, …`
`type= * | _all | glob pattern | name1, name2, …`
Alternatively, the keyword `_warmers` can be used.
DELETE options for _alias:
Several aliases can be deleted at once by defining several indices and names with
`[DELETE] /{index}/_alias/{type}`
where
`index= * | _all | glob pattern | name1, name2, …`
`type= * | _all | glob pattern | name1, name2, …`
Alternatively, the keyword `_aliases` can be used.
2014-01-08 04:34:48 -05:00
|
|
|
setup:
|
|
|
|
- do:
|
|
|
|
indices.create:
|
|
|
|
index: test_index1
|
2014-02-04 04:09:31 -05:00
|
|
|
body:
|
|
|
|
warmers:
|
|
|
|
test_warmer1:
|
|
|
|
source:
|
|
|
|
query:
|
|
|
|
match_all: {}
|
|
|
|
test_warmer2:
|
|
|
|
source:
|
|
|
|
query:
|
|
|
|
match_all: {}
|
Make PUT and DELETE consistent for _mapping, _alias and _warmer
See issue #4071
PUT options for _mapping:
Single type can now be added with
`[PUT|POST] {index|_all|*|regex|blank}/[_mapping|_mappings]/type`
and
`[PUT|POST] {index|_all|*|regex|blank}/type/[_mapping|_mappings]`
PUT options for _warmer:
PUT with a single warmer can now be done with
`[PUT|POST] {index|_all|*|prefix*|blank}/{type|_all|*|prefix*|blank}/[_warmer|_warmers]/warmer_name`
PUT options for _alias:
Single alias can now be PUT with
`[PUT|POST] {index|_all|*|prefix*|blank}/[_alias|_aliases]/alias`
DELETE options _mapping:
Several mappings can be deleted at once by defining several indices and types with
`[DELETE] /{index}/{type}`
`[DELETE] /{index}/{type}/_mapping`
`[DELETE] /{index}/_mapping/{type}`
where
`index= * | _all | glob pattern | name1, name2, …`
`type= * | _all | glob pattern | name1, name2, …`
Alternatively, the keyword `_mapings` can be used.
DELETE options for _warmer:
Several warmers can be deleted at once by defining several indices and names with
`[DELETE] /{index}/_warmer/{type}`
where
`index= * | _all | glob pattern | name1, name2, …`
`type= * | _all | glob pattern | name1, name2, …`
Alternatively, the keyword `_warmers` can be used.
DELETE options for _alias:
Several aliases can be deleted at once by defining several indices and names with
`[DELETE] /{index}/_alias/{type}`
where
`index= * | _all | glob pattern | name1, name2, …`
`type= * | _all | glob pattern | name1, name2, …`
Alternatively, the keyword `_aliases` can be used.
2014-01-08 04:34:48 -05:00
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.create:
|
|
|
|
index: test_index2
|
2014-02-04 04:09:31 -05:00
|
|
|
body:
|
|
|
|
warmers:
|
|
|
|
test_warmer1:
|
|
|
|
source:
|
|
|
|
query:
|
|
|
|
match_all: {}
|
|
|
|
test_warmer2:
|
|
|
|
source:
|
|
|
|
query:
|
|
|
|
match_all: {}
|
Make PUT and DELETE consistent for _mapping, _alias and _warmer
See issue #4071
PUT options for _mapping:
Single type can now be added with
`[PUT|POST] {index|_all|*|regex|blank}/[_mapping|_mappings]/type`
and
`[PUT|POST] {index|_all|*|regex|blank}/type/[_mapping|_mappings]`
PUT options for _warmer:
PUT with a single warmer can now be done with
`[PUT|POST] {index|_all|*|prefix*|blank}/{type|_all|*|prefix*|blank}/[_warmer|_warmers]/warmer_name`
PUT options for _alias:
Single alias can now be PUT with
`[PUT|POST] {index|_all|*|prefix*|blank}/[_alias|_aliases]/alias`
DELETE options _mapping:
Several mappings can be deleted at once by defining several indices and types with
`[DELETE] /{index}/{type}`
`[DELETE] /{index}/{type}/_mapping`
`[DELETE] /{index}/_mapping/{type}`
where
`index= * | _all | glob pattern | name1, name2, …`
`type= * | _all | glob pattern | name1, name2, …`
Alternatively, the keyword `_mapings` can be used.
DELETE options for _warmer:
Several warmers can be deleted at once by defining several indices and names with
`[DELETE] /{index}/_warmer/{type}`
where
`index= * | _all | glob pattern | name1, name2, …`
`type= * | _all | glob pattern | name1, name2, …`
Alternatively, the keyword `_warmers` can be used.
DELETE options for _alias:
Several aliases can be deleted at once by defining several indices and names with
`[DELETE] /{index}/_alias/{type}`
where
`index= * | _all | glob pattern | name1, name2, …`
`type= * | _all | glob pattern | name1, name2, …`
Alternatively, the keyword `_aliases` can be used.
2014-01-08 04:34:48 -05:00
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.create:
|
|
|
|
index: foo
|
|
|
|
body:
|
2014-02-04 04:09:31 -05:00
|
|
|
warmers:
|
|
|
|
test_warmer1:
|
|
|
|
source:
|
|
|
|
query:
|
|
|
|
match_all: {}
|
|
|
|
test_warmer2:
|
|
|
|
source:
|
|
|
|
query:
|
|
|
|
match_all: {}
|
Make PUT and DELETE consistent for _mapping, _alias and _warmer
See issue #4071
PUT options for _mapping:
Single type can now be added with
`[PUT|POST] {index|_all|*|regex|blank}/[_mapping|_mappings]/type`
and
`[PUT|POST] {index|_all|*|regex|blank}/type/[_mapping|_mappings]`
PUT options for _warmer:
PUT with a single warmer can now be done with
`[PUT|POST] {index|_all|*|prefix*|blank}/{type|_all|*|prefix*|blank}/[_warmer|_warmers]/warmer_name`
PUT options for _alias:
Single alias can now be PUT with
`[PUT|POST] {index|_all|*|prefix*|blank}/[_alias|_aliases]/alias`
DELETE options _mapping:
Several mappings can be deleted at once by defining several indices and types with
`[DELETE] /{index}/{type}`
`[DELETE] /{index}/{type}/_mapping`
`[DELETE] /{index}/_mapping/{type}`
where
`index= * | _all | glob pattern | name1, name2, …`
`type= * | _all | glob pattern | name1, name2, …`
Alternatively, the keyword `_mapings` can be used.
DELETE options for _warmer:
Several warmers can be deleted at once by defining several indices and names with
`[DELETE] /{index}/_warmer/{type}`
where
`index= * | _all | glob pattern | name1, name2, …`
`type= * | _all | glob pattern | name1, name2, …`
Alternatively, the keyword `_warmers` can be used.
DELETE options for _alias:
Several aliases can be deleted at once by defining several indices and names with
`[DELETE] /{index}/_alias/{type}`
where
`index= * | _all | glob pattern | name1, name2, …`
`type= * | _all | glob pattern | name1, name2, …`
Alternatively, the keyword `_aliases` can be used.
2014-01-08 04:34:48 -05:00
|
|
|
|
|
|
|
---
|
|
|
|
"Check setup":
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.get_warmer: { index: _all, name: '*' }
|
|
|
|
|
|
|
|
- match: {test_index1.warmers.test_warmer1.source.query.match_all: {}}
|
|
|
|
- match: {test_index1.warmers.test_warmer2.source.query.match_all: {}}
|
|
|
|
- match: {test_index2.warmers.test_warmer1.source.query.match_all: {}}
|
|
|
|
- match: {test_index2.warmers.test_warmer2.source.query.match_all: {}}
|
|
|
|
- match: {foo.warmers.test_warmer1.source.query.match_all: {}}
|
|
|
|
- match: {foo.warmers.test_warmer2.source.query.match_all: {}}
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
"check delete with _all index":
|
|
|
|
- do:
|
|
|
|
indices.delete_warmer:
|
|
|
|
index: _all
|
|
|
|
name: test_warmer1
|
|
|
|
|
|
|
|
- do:
|
2014-01-14 16:31:42 -05:00
|
|
|
indices.get_warmer: {}
|
Make PUT and DELETE consistent for _mapping, _alias and _warmer
See issue #4071
PUT options for _mapping:
Single type can now be added with
`[PUT|POST] {index|_all|*|regex|blank}/[_mapping|_mappings]/type`
and
`[PUT|POST] {index|_all|*|regex|blank}/type/[_mapping|_mappings]`
PUT options for _warmer:
PUT with a single warmer can now be done with
`[PUT|POST] {index|_all|*|prefix*|blank}/{type|_all|*|prefix*|blank}/[_warmer|_warmers]/warmer_name`
PUT options for _alias:
Single alias can now be PUT with
`[PUT|POST] {index|_all|*|prefix*|blank}/[_alias|_aliases]/alias`
DELETE options _mapping:
Several mappings can be deleted at once by defining several indices and types with
`[DELETE] /{index}/{type}`
`[DELETE] /{index}/{type}/_mapping`
`[DELETE] /{index}/_mapping/{type}`
where
`index= * | _all | glob pattern | name1, name2, …`
`type= * | _all | glob pattern | name1, name2, …`
Alternatively, the keyword `_mapings` can be used.
DELETE options for _warmer:
Several warmers can be deleted at once by defining several indices and names with
`[DELETE] /{index}/_warmer/{type}`
where
`index= * | _all | glob pattern | name1, name2, …`
`type= * | _all | glob pattern | name1, name2, …`
Alternatively, the keyword `_warmers` can be used.
DELETE options for _alias:
Several aliases can be deleted at once by defining several indices and names with
`[DELETE] /{index}/_alias/{type}`
where
`index= * | _all | glob pattern | name1, name2, …`
`type= * | _all | glob pattern | name1, name2, …`
Alternatively, the keyword `_aliases` can be used.
2014-01-08 04:34:48 -05:00
|
|
|
|
|
|
|
- match: {test_index1.warmers.test_warmer2.source.query.match_all: {}}
|
|
|
|
- match: {test_index2.warmers.test_warmer2.source.query.match_all: {}}
|
|
|
|
- match: {foo.warmers.test_warmer2.source.query.match_all: {}}
|
|
|
|
|
|
|
|
---
|
|
|
|
"check delete with * index":
|
|
|
|
- do:
|
|
|
|
indices.delete_warmer:
|
|
|
|
index: "*"
|
|
|
|
name: test_warmer1
|
|
|
|
|
|
|
|
- do:
|
2014-01-14 16:31:42 -05:00
|
|
|
indices.get_warmer: {}
|
Make PUT and DELETE consistent for _mapping, _alias and _warmer
See issue #4071
PUT options for _mapping:
Single type can now be added with
`[PUT|POST] {index|_all|*|regex|blank}/[_mapping|_mappings]/type`
and
`[PUT|POST] {index|_all|*|regex|blank}/type/[_mapping|_mappings]`
PUT options for _warmer:
PUT with a single warmer can now be done with
`[PUT|POST] {index|_all|*|prefix*|blank}/{type|_all|*|prefix*|blank}/[_warmer|_warmers]/warmer_name`
PUT options for _alias:
Single alias can now be PUT with
`[PUT|POST] {index|_all|*|prefix*|blank}/[_alias|_aliases]/alias`
DELETE options _mapping:
Several mappings can be deleted at once by defining several indices and types with
`[DELETE] /{index}/{type}`
`[DELETE] /{index}/{type}/_mapping`
`[DELETE] /{index}/_mapping/{type}`
where
`index= * | _all | glob pattern | name1, name2, …`
`type= * | _all | glob pattern | name1, name2, …`
Alternatively, the keyword `_mapings` can be used.
DELETE options for _warmer:
Several warmers can be deleted at once by defining several indices and names with
`[DELETE] /{index}/_warmer/{type}`
where
`index= * | _all | glob pattern | name1, name2, …`
`type= * | _all | glob pattern | name1, name2, …`
Alternatively, the keyword `_warmers` can be used.
DELETE options for _alias:
Several aliases can be deleted at once by defining several indices and names with
`[DELETE] /{index}/_alias/{type}`
where
`index= * | _all | glob pattern | name1, name2, …`
`type= * | _all | glob pattern | name1, name2, …`
Alternatively, the keyword `_aliases` can be used.
2014-01-08 04:34:48 -05:00
|
|
|
|
|
|
|
- match: {test_index1.warmers.test_warmer2.source.query.match_all: {}}
|
|
|
|
- match: {test_index2.warmers.test_warmer2.source.query.match_all: {}}
|
|
|
|
- match: {foo.warmers.test_warmer2.source.query.match_all: {}}
|
|
|
|
|
|
|
|
---
|
|
|
|
"check delete with index list":
|
|
|
|
- do:
|
|
|
|
indices.delete_warmer:
|
|
|
|
index: "test_index1,test_index2"
|
|
|
|
name: test_warmer1
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.get_warmer: { index: _all, name: 'test_warmer1' }
|
|
|
|
|
|
|
|
- match: {foo.warmers.test_warmer1.source.query.match_all: {}}
|
|
|
|
- is_false: test_index1
|
|
|
|
- is_false: test_index2
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.get_warmer: { index: _all, name: 'test_warmer2' }
|
|
|
|
|
|
|
|
- match: {test_index1.warmers.test_warmer2.source.query.match_all: {}}
|
|
|
|
- match: {test_index2.warmers.test_warmer2.source.query.match_all: {}}
|
|
|
|
- match: {foo.warmers.test_warmer2.source.query.match_all: {}}
|
|
|
|
|
|
|
|
---
|
|
|
|
"check delete with prefix* index":
|
|
|
|
- do:
|
|
|
|
indices.delete_warmer:
|
|
|
|
index: "test_*"
|
|
|
|
name: test_warmer1
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.get_warmer: { index: _all, name: 'test_warmer1' }
|
|
|
|
|
|
|
|
- match: {foo.warmers.test_warmer1.source.query.match_all: {}}
|
|
|
|
- is_false: test_index1
|
|
|
|
- is_false: test_index2
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.get_warmer: { index: _all, name: 'test_warmer2' }
|
|
|
|
|
|
|
|
- match: {test_index1.warmers.test_warmer2.source.query.match_all: {}}
|
|
|
|
- match: {test_index2.warmers.test_warmer2.source.query.match_all: {}}
|
|
|
|
- match: {foo.warmers.test_warmer2.source.query.match_all: {}}
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
"check delete with index list and * warmers":
|
|
|
|
- do:
|
|
|
|
indices.delete_warmer:
|
|
|
|
index: "test_index1,test_index2"
|
|
|
|
name: "*"
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.get_warmer: { index: _all, name: 'test_warmer1' }
|
|
|
|
|
|
|
|
- match: {foo.warmers.test_warmer1.source.query.match_all: {}}
|
|
|
|
- is_false: test_index1
|
|
|
|
- is_false: test_index2
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.get_warmer: { index: _all, name: 'test_warmer2' }
|
|
|
|
|
|
|
|
- match: {foo.warmers.test_warmer2.source.query.match_all: {}}
|
|
|
|
- is_false: test_index1
|
|
|
|
- is_false: test_index2
|
|
|
|
|
|
|
|
---
|
|
|
|
"check delete with index list and _all warmers":
|
|
|
|
- do:
|
2014-01-14 16:31:42 -05:00
|
|
|
indices.delete_warmer:
|
Make PUT and DELETE consistent for _mapping, _alias and _warmer
See issue #4071
PUT options for _mapping:
Single type can now be added with
`[PUT|POST] {index|_all|*|regex|blank}/[_mapping|_mappings]/type`
and
`[PUT|POST] {index|_all|*|regex|blank}/type/[_mapping|_mappings]`
PUT options for _warmer:
PUT with a single warmer can now be done with
`[PUT|POST] {index|_all|*|prefix*|blank}/{type|_all|*|prefix*|blank}/[_warmer|_warmers]/warmer_name`
PUT options for _alias:
Single alias can now be PUT with
`[PUT|POST] {index|_all|*|prefix*|blank}/[_alias|_aliases]/alias`
DELETE options _mapping:
Several mappings can be deleted at once by defining several indices and types with
`[DELETE] /{index}/{type}`
`[DELETE] /{index}/{type}/_mapping`
`[DELETE] /{index}/_mapping/{type}`
where
`index= * | _all | glob pattern | name1, name2, …`
`type= * | _all | glob pattern | name1, name2, …`
Alternatively, the keyword `_mapings` can be used.
DELETE options for _warmer:
Several warmers can be deleted at once by defining several indices and names with
`[DELETE] /{index}/_warmer/{type}`
where
`index= * | _all | glob pattern | name1, name2, …`
`type= * | _all | glob pattern | name1, name2, …`
Alternatively, the keyword `_warmers` can be used.
DELETE options for _alias:
Several aliases can be deleted at once by defining several indices and names with
`[DELETE] /{index}/_alias/{type}`
where
`index= * | _all | glob pattern | name1, name2, …`
`type= * | _all | glob pattern | name1, name2, …`
Alternatively, the keyword `_aliases` can be used.
2014-01-08 04:34:48 -05:00
|
|
|
index: "test_index1,test_index2"
|
|
|
|
name: _all
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.get_warmer: { index: _all, name: 'test_warmer1' }
|
|
|
|
|
|
|
|
- match: {foo.warmers.test_warmer1.source.query.match_all: {}}
|
|
|
|
- is_false: test_index1
|
|
|
|
- is_false: test_index2
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.get_warmer: { index: _all, name: 'test_warmer2' }
|
|
|
|
|
|
|
|
- match: {foo.warmers.test_warmer2.source.query.match_all: {}}
|
|
|
|
- is_false: test_index1
|
|
|
|
- is_false: test_index2
|
|
|
|
|
|
|
|
---
|
|
|
|
"check delete with index list and wildcard warmers":
|
|
|
|
- do:
|
|
|
|
indices.delete_warmer:
|
|
|
|
index: "test_index1,test_index2"
|
|
|
|
name: "*1"
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.get_warmer: { index: _all, name: 'test_warmer1' }
|
|
|
|
|
|
|
|
- match: {foo.warmers.test_warmer1.source.query.match_all: {}}
|
|
|
|
- is_false: test_index1
|
|
|
|
- is_false: test_index2
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.get_warmer: { index: _all, name: 'test_warmer2' }
|
|
|
|
|
|
|
|
- match: {test_index1.warmers.test_warmer2.source.query.match_all: {}}
|
|
|
|
- match: {test_index2.warmers.test_warmer2.source.query.match_all: {}}
|
|
|
|
- match: {foo.warmers.test_warmer2.source.query.match_all: {}}
|
|
|
|
|
|
|
|
---
|
|
|
|
"check 404 on no matching test_warmer":
|
|
|
|
- do:
|
|
|
|
catch: missing
|
|
|
|
indices.delete_warmer:
|
|
|
|
index: "*"
|
|
|
|
name: "non_existent"
|
|
|
|
|
|
|
|
- do:
|
|
|
|
catch: missing
|
|
|
|
indices.delete_warmer:
|
|
|
|
index: "non_existent"
|
|
|
|
name: "test_warmer1"
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
"check delete with blank index and blank test_warmer":
|
|
|
|
- do:
|
|
|
|
catch: param
|
|
|
|
indices.delete_warmer:
|
|
|
|
name: "test_warmer1"
|
|
|
|
|
|
|
|
- do:
|
|
|
|
catch: param
|
|
|
|
indices.delete_warmer:
|
|
|
|
index: "test_index1"
|
|
|
|
|