mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-26 06:46:10 +00:00
Named wildcards were not always properly replaced with proper values by PathTrie. Delete index (curl -XDELETE localhost:9200/*) worked anyway as the named wildcard is the last path element (and even if {index} didn't get replaced with '*', the empty string would have mapped to all indices anyway). When the named wildcard wasn't the last path element (e.g. curl -XPOST localhost:29200/*/_close), the variable didn't get replaced with the current '*' value, but with the empty string, which leads to an error as empty index is not allowed by open/close index. Closes #4564
82 lines
1.1 KiB
YAML
82 lines
1.1 KiB
YAML
setup:
|
|
- do:
|
|
indices.create:
|
|
index: test_index1
|
|
- do:
|
|
indices.create:
|
|
index: test_index2
|
|
- do:
|
|
indices.create:
|
|
index: test_index3
|
|
- do:
|
|
cluster.health:
|
|
wait_for_status: yellow
|
|
|
|
---
|
|
"All indices":
|
|
- do:
|
|
indices.close:
|
|
index: _all
|
|
|
|
- do:
|
|
catch: forbidden
|
|
search:
|
|
index: test_index2
|
|
|
|
- do:
|
|
indices.open:
|
|
index: _all
|
|
|
|
- do:
|
|
cluster.health:
|
|
wait_for_status: yellow
|
|
|
|
- do:
|
|
search:
|
|
index: test_index2
|
|
|
|
---
|
|
"Trailing wildcard":
|
|
- do:
|
|
indices.close:
|
|
index: test_*
|
|
|
|
- do:
|
|
catch: forbidden
|
|
search:
|
|
index: test_index2
|
|
|
|
- do:
|
|
indices.open:
|
|
index: test_*
|
|
|
|
- do:
|
|
cluster.health:
|
|
wait_for_status: yellow
|
|
|
|
- do:
|
|
search:
|
|
index: test_index2
|
|
|
|
---
|
|
"Only wildcard":
|
|
- do:
|
|
indices.close:
|
|
index: '*'
|
|
|
|
- do:
|
|
catch: forbidden
|
|
search:
|
|
index: test_index3
|
|
|
|
- do:
|
|
indices.open:
|
|
index: '*'
|
|
|
|
- do:
|
|
cluster.health:
|
|
wait_for_status: yellow
|
|
|
|
- do:
|
|
search:
|
|
index: test_index3 |