2014-02-07 11:36:01 -05:00
|
|
|
---
|
|
|
|
"Help":
|
|
|
|
- do:
|
|
|
|
cat.aliases:
|
|
|
|
help: true
|
|
|
|
|
|
|
|
- match:
|
2014-05-02 18:27:40 -04:00
|
|
|
$body: |
|
2014-02-07 11:36:01 -05:00
|
|
|
/^ alias .+ \n
|
|
|
|
index .+ \n
|
|
|
|
filter .+ \n
|
|
|
|
routing.index .+ \n
|
|
|
|
routing.search .+ \n
|
|
|
|
$/
|
|
|
|
|
|
|
|
---
|
|
|
|
"Empty cluster":
|
|
|
|
|
|
|
|
- do:
|
|
|
|
cat.aliases: {}
|
|
|
|
|
|
|
|
- match:
|
2014-05-02 18:27:40 -04:00
|
|
|
$body: |
|
2014-02-07 11:36:01 -05:00
|
|
|
/^
|
|
|
|
$/
|
|
|
|
|
|
|
|
---
|
|
|
|
"Simple alias":
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.create:
|
|
|
|
index: test
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.put_alias:
|
|
|
|
index: test
|
|
|
|
name: test_alias
|
|
|
|
|
|
|
|
- do:
|
|
|
|
cat.aliases: {}
|
|
|
|
|
|
|
|
- match:
|
2014-05-02 18:27:40 -04:00
|
|
|
$body: |
|
2014-02-07 11:36:01 -05:00
|
|
|
/^
|
|
|
|
test_alias \s+
|
|
|
|
test \s+
|
|
|
|
- \s+
|
|
|
|
- \s+
|
|
|
|
- \s+
|
|
|
|
$/
|
|
|
|
|
|
|
|
---
|
|
|
|
"Complex alias":
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.create:
|
|
|
|
index: test
|
2014-07-18 16:50:07 -04:00
|
|
|
body:
|
|
|
|
mappings:
|
|
|
|
type_1:
|
|
|
|
properties:
|
|
|
|
foo:
|
|
|
|
type: string
|
2014-02-07 11:36:01 -05:00
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.put_alias:
|
|
|
|
index: test
|
|
|
|
name: test_alias
|
|
|
|
body:
|
|
|
|
index_routing: ir
|
|
|
|
search_routing: "sr1,sr2"
|
|
|
|
filter:
|
|
|
|
term:
|
|
|
|
foo: bar
|
|
|
|
- do:
|
|
|
|
cat.aliases: {}
|
|
|
|
|
|
|
|
- match:
|
2014-05-02 18:27:40 -04:00
|
|
|
$body: |
|
2014-02-07 11:36:01 -05:00
|
|
|
/^
|
|
|
|
test_alias \s+
|
|
|
|
test \s+
|
|
|
|
[*] \s+
|
|
|
|
ir \s+
|
|
|
|
sr1,sr2 \s+
|
|
|
|
$/
|
|
|
|
|
|
|
|
---
|
|
|
|
"Alias name":
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.create:
|
|
|
|
index: test
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.put_alias:
|
|
|
|
index: test
|
|
|
|
name: test_1
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.put_alias:
|
|
|
|
index: test
|
|
|
|
name: test_2
|
|
|
|
|
|
|
|
- do:
|
|
|
|
cat.aliases:
|
|
|
|
name: test_1
|
|
|
|
|
|
|
|
- match:
|
|
|
|
$body: /^test_1 .+ \n$/
|
|
|
|
|
|
|
|
- do:
|
|
|
|
cat.aliases:
|
|
|
|
name: test_2
|
|
|
|
|
|
|
|
- match:
|
|
|
|
$body: /^test_2 .+ \n$/
|
|
|
|
|
|
|
|
- do:
|
|
|
|
cat.aliases:
|
|
|
|
name: test_*
|
|
|
|
|
|
|
|
- match:
|
|
|
|
$body: / (^|\n)test_1 .+ \n/
|
|
|
|
|
|
|
|
- match:
|
|
|
|
$body: / (^|\n)test_2 .+ \n/
|
|
|
|
|
|
|
|
---
|
|
|
|
"Column headers":
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.create:
|
|
|
|
index: test
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.put_alias:
|
|
|
|
index: test
|
|
|
|
name: test_1
|
|
|
|
|
|
|
|
- do:
|
|
|
|
cat.aliases:
|
|
|
|
v: true
|
|
|
|
|
|
|
|
- match:
|
2014-05-02 18:27:40 -04:00
|
|
|
$body: |
|
2014-02-07 11:36:01 -05:00
|
|
|
/^ alias \s+
|
|
|
|
index \s+
|
|
|
|
filter \s+
|
|
|
|
routing.index \s+
|
|
|
|
routing.search \s+
|
|
|
|
\n
|
|
|
|
test_1 \s+
|
|
|
|
test \s+
|
|
|
|
- \s+
|
|
|
|
- \s+
|
|
|
|
- \s+
|
|
|
|
$/
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
"Select columns":
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.create:
|
|
|
|
index: test
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.put_alias:
|
|
|
|
index: test
|
|
|
|
name: test_1
|
|
|
|
|
|
|
|
- do:
|
|
|
|
cat.aliases:
|
|
|
|
h: [index, alias]
|
|
|
|
|
|
|
|
- match:
|
|
|
|
$body: /^ test \s+ test_1 \s+ $/
|
|
|
|
|
|
|
|
|
|
|
|
- do:
|
|
|
|
cat.aliases:
|
|
|
|
h: [index, alias]
|
|
|
|
v: true
|
|
|
|
- match:
|
2014-05-02 18:27:40 -04:00
|
|
|
$body: |
|
2014-02-07 11:36:01 -05:00
|
|
|
/^
|
|
|
|
index \s+ alias \s+ \n
|
|
|
|
test \s+ test_1 \s+ \n
|
|
|
|
$/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|