272 lines
8.4 KiB
YAML
272 lines
8.4 KiB
YAML
---
|
|
setup:
|
|
|
|
- do:
|
|
indices.create:
|
|
index: test1
|
|
body:
|
|
mappings:
|
|
bar:
|
|
properties:
|
|
bar:
|
|
type: string
|
|
fields:
|
|
completion:
|
|
type: completion
|
|
baz:
|
|
type: string
|
|
fields:
|
|
completion:
|
|
type: completion
|
|
- do:
|
|
index:
|
|
index: test1
|
|
type: bar
|
|
id: 1
|
|
body: { "bar": "bar", "baz": "baz" }
|
|
|
|
- do:
|
|
index:
|
|
index: test2
|
|
type: baz
|
|
id: 1
|
|
body: { "bar": "bar", "baz": "baz" }
|
|
|
|
- do:
|
|
indices.refresh: {}
|
|
|
|
- do:
|
|
search:
|
|
sort: bar,baz
|
|
|
|
---
|
|
"Fields - blank":
|
|
- do:
|
|
indices.stats: {}
|
|
|
|
- gt: { _all.total.fielddata.memory_size_in_bytes: 0 }
|
|
- is_false: _all.total.fielddata.fields
|
|
- gt: { _all.total.completion.size_in_bytes: 0 }
|
|
- is_false: _all.total.completion.fields
|
|
|
|
---
|
|
"Fields - one":
|
|
- do:
|
|
indices.stats: { fields: bar }
|
|
|
|
- gt: { _all.total.fielddata.memory_size_in_bytes: 0 }
|
|
- gt: { _all.total.fielddata.fields.bar.memory_size_in_bytes: 0 }
|
|
- is_false: _all.total.fielddata.fields.baz
|
|
- gt: { _all.total.completion.size_in_bytes: 0 }
|
|
- is_false: _all.total.completion.fields.bar
|
|
|
|
---
|
|
"Fields - multi":
|
|
- do:
|
|
indices.stats: { fields: "bar,baz.completion" }
|
|
|
|
- gt: { _all.total.fielddata.memory_size_in_bytes: 0 }
|
|
- gt: { _all.total.fielddata.fields.bar.memory_size_in_bytes: 0 }
|
|
- is_false: _all.total.fielddata.fields.baz
|
|
- gt: { _all.total.completion.size_in_bytes: 0 }
|
|
- is_false: _all.total.completion.fields.bar\.completion
|
|
- gt: { _all.total.completion.fields.baz\.completion.size_in_bytes: 0 }
|
|
|
|
---
|
|
"Fields - star":
|
|
- do:
|
|
indices.stats: { fields: "*" }
|
|
|
|
- gt: { _all.total.fielddata.memory_size_in_bytes: 0 }
|
|
- gt: { _all.total.fielddata.fields.bar.memory_size_in_bytes: 0 }
|
|
- gt: { _all.total.fielddata.fields.baz.memory_size_in_bytes: 0 }
|
|
- gt: { _all.total.completion.size_in_bytes: 0 }
|
|
- gt: { _all.total.completion.fields.bar\.completion.size_in_bytes: 0 }
|
|
- gt: { _all.total.completion.fields.baz\.completion.size_in_bytes: 0 }
|
|
|
|
---
|
|
"Fields - pattern":
|
|
- do:
|
|
indices.stats: { fields: "bar*" }
|
|
|
|
- gt: { _all.total.fielddata.memory_size_in_bytes: 0 }
|
|
- gt: { _all.total.fielddata.fields.bar.memory_size_in_bytes: 0 }
|
|
- is_false: _all.total.fielddata.fields.baz
|
|
- gt: { _all.total.completion.size_in_bytes: 0 }
|
|
- gt: { _all.total.completion.fields.bar\.completion.size_in_bytes: 0 }
|
|
- is_false: _all.total.completion.fields.baz\.completion
|
|
|
|
---
|
|
"Fields - _all metric":
|
|
- do:
|
|
indices.stats: { fields: "bar*", metric: _all }
|
|
|
|
- gt: { _all.total.fielddata.memory_size_in_bytes: 0 }
|
|
- gt: { _all.total.fielddata.fields.bar.memory_size_in_bytes: 0 }
|
|
- is_false: _all.total.fielddata.fields.baz
|
|
- gt: { _all.total.completion.size_in_bytes: 0 }
|
|
- gt: { _all.total.completion.fields.bar\.completion.size_in_bytes: 0 }
|
|
- is_false: _all.total.completion.fields.baz\.completion
|
|
|
|
---
|
|
"Fields - fielddata metric":
|
|
- do:
|
|
indices.stats: { fields: "bar*", metric: fielddata }
|
|
|
|
- gt: { _all.total.fielddata.memory_size_in_bytes: 0 }
|
|
- gt: { _all.total.fielddata.fields.bar.memory_size_in_bytes: 0 }
|
|
- is_false: _all.total.fielddata.fields.baz
|
|
- is_false: _all.total.completion
|
|
|
|
---
|
|
"Fields - completion metric":
|
|
- do:
|
|
indices.stats: { fields: "bar*", metric: completion }
|
|
|
|
- is_false: _all.total.fielddata
|
|
- gt: { _all.total.completion.size_in_bytes: 0 }
|
|
- gt: { _all.total.completion.fields.bar\.completion.size_in_bytes: 0 }
|
|
- is_false: _all.total.completion.fields.baz\.completion
|
|
|
|
---
|
|
"Fields - multi metric":
|
|
- do:
|
|
indices.stats: { fields: "bar*" , metric: [ completion, fielddata, search ]}
|
|
|
|
- gt: { _all.total.fielddata.memory_size_in_bytes: 0 }
|
|
- gt: { _all.total.fielddata.fields.bar.memory_size_in_bytes: 0 }
|
|
- is_false: _all.total.fielddata.fields.baz
|
|
- gt: { _all.total.completion.size_in_bytes: 0 }
|
|
- gt: { _all.total.completion.fields.bar\.completion.size_in_bytes: 0 }
|
|
- is_false: _all.total.completion.fields.baz\.completion
|
|
|
|
---
|
|
"Fielddata fields - one":
|
|
- do:
|
|
indices.stats: { fielddata_fields: bar }
|
|
|
|
- gt: { _all.total.fielddata.fields.bar.memory_size_in_bytes: 0 }
|
|
- is_false: _all.total.fielddata.fields.baz
|
|
- is_false: _all.total.completion.fields
|
|
|
|
---
|
|
"Fielddata fields - multi":
|
|
- do:
|
|
indices.stats: { fielddata_fields: "bar,baz,baz.completion" }
|
|
|
|
- gt: { _all.total.fielddata.fields.bar.memory_size_in_bytes: 0 }
|
|
- gt: { _all.total.fielddata.fields.baz.memory_size_in_bytes: 0 }
|
|
- is_false: _all.total.completion.fields
|
|
|
|
---
|
|
"Fielddata fields - star":
|
|
- do:
|
|
indices.stats: { fielddata_fields: "*" }
|
|
|
|
- gt: { _all.total.fielddata.fields.bar.memory_size_in_bytes: 0 }
|
|
- gt: { _all.total.fielddata.fields.baz.memory_size_in_bytes: 0 }
|
|
- is_false: _all.total.completion.fields
|
|
|
|
---
|
|
"Fielddata fields - pattern":
|
|
- do:
|
|
indices.stats: { fielddata_fields: "*r" }
|
|
|
|
- gt: { _all.total.fielddata.fields.bar.memory_size_in_bytes: 0 }
|
|
- is_false: _all.total.fielddata.fields.baz
|
|
- is_false: _all.total.completion.fields
|
|
|
|
|
|
---
|
|
"Fielddata fields - all metric":
|
|
- do:
|
|
indices.stats: { fielddata_fields: "*r", metric: _all }
|
|
|
|
- gt: { _all.total.fielddata.fields.bar.memory_size_in_bytes: 0 }
|
|
- is_false: _all.total.fielddata.fields.baz
|
|
- is_false: _all.total.completion.fields
|
|
|
|
---
|
|
"Fielddata fields - one metric":
|
|
- do:
|
|
indices.stats: { fielddata_fields: "*r", metric: fielddata }
|
|
|
|
- gt: { _all.total.fielddata.fields.bar.memory_size_in_bytes: 0 }
|
|
- is_false: _all.total.fielddata.fields.baz
|
|
- is_false: _all.total.completion.fields
|
|
|
|
|
|
---
|
|
"Fielddata fields - multi metric":
|
|
- do:
|
|
indices.stats: { fielddata_fields: "*r", metric: [ fielddata, search] }
|
|
|
|
- gt: { _all.total.fielddata.fields.bar.memory_size_in_bytes: 0 }
|
|
- is_false: _all.total.fielddata.fields.baz
|
|
- is_false: _all.total.completion.fields
|
|
|
|
|
|
---
|
|
"Completion fields - one":
|
|
- do:
|
|
indices.stats: { completion_fields: bar.completion }
|
|
|
|
- gt: { _all.total.completion.fields.bar\.completion.size_in_bytes: 0 }
|
|
- is_false: _all.total.completion.fields.baz\.completion
|
|
- is_false: _all.total.fielddata.fields
|
|
|
|
---
|
|
"Completion fields - multi":
|
|
- do:
|
|
indices.stats: { completion_fields: "bar.completion,baz,baz.completion" }
|
|
|
|
- gt: { _all.total.completion.fields.bar\.completion.size_in_bytes: 0 }
|
|
- gt: { _all.total.completion.fields.baz\.completion.size_in_bytes: 0 }
|
|
- is_false: _all.total.fielddata.fields
|
|
|
|
---
|
|
"Completion fields - star":
|
|
- do:
|
|
indices.stats: { completion_fields: "*" }
|
|
|
|
- gt: { _all.total.completion.fields.bar\.completion.size_in_bytes: 0 }
|
|
- gt: { _all.total.completion.fields.baz\.completion.size_in_bytes: 0 }
|
|
- is_false: _all.total.fielddata.fields
|
|
|
|
---
|
|
"Completion - pattern":
|
|
- do:
|
|
indices.stats: { completion_fields: "*r*" }
|
|
|
|
- gt: { _all.total.completion.fields.bar\.completion.size_in_bytes: 0 }
|
|
- is_false: _all.total.completion.fields.baz\.completion
|
|
- is_false: _all.total.fielddata.fields
|
|
|
|
---
|
|
"Completion - all metric":
|
|
- do:
|
|
indices.stats: { completion_fields: "*r*", metric: _all }
|
|
|
|
- gt: { _all.total.completion.fields.bar\.completion.size_in_bytes: 0 }
|
|
- is_false: _all.total.completion.fields.baz\.completion
|
|
- is_false: _all.total.fielddata.fields
|
|
|
|
---
|
|
"Completion - one metric":
|
|
- do:
|
|
indices.stats: { completion_fields: "*r*", metric: completion }
|
|
|
|
- gt: { _all.total.completion.fields.bar\.completion.size_in_bytes: 0 }
|
|
- is_false: _all.total.completion.fields.baz\.completion
|
|
- is_false: _all.total.fielddata.fields
|
|
|
|
---
|
|
"Completion - multi metric":
|
|
- do:
|
|
indices.stats: { completion_fields: "*r*", metric: [ completion, search ] }
|
|
|
|
- gt: { _all.total.completion.fields.bar\.completion.size_in_bytes: 0 }
|
|
- is_false: _all.total.completion.fields.baz\.completion
|
|
- is_false: _all.total.fielddata.fields
|
|
|