53 lines
1.5 KiB
YAML
53 lines
1.5 KiB
YAML
---
|
|
"Basic field stats":
|
|
- do:
|
|
index:
|
|
index: test_1
|
|
type: test
|
|
id: id_1
|
|
body: { foo: "bar", number: 123 }
|
|
|
|
- do:
|
|
indices.refresh: {}
|
|
|
|
- do:
|
|
field_stats:
|
|
index: test_1
|
|
fields: [foo, number]
|
|
|
|
- match: { indices._all.fields.foo.max_doc: 1 }
|
|
- match: { indices._all.fields.foo.doc_count: 1 }
|
|
- match: { indices._all.fields.foo.min_value: "bar" }
|
|
- match: { indices._all.fields.foo.max_value: "bar" }
|
|
- match: { indices._all.fields.number.max_doc: 1 }
|
|
- match: { indices._all.fields.number.doc_count: 1 }
|
|
- match: { indices._all.fields.number.min_value: 123 }
|
|
- match: { indices._all.fields.number.max_value: 123 }
|
|
|
|
---
|
|
"Basic field stats with level set to indices":
|
|
- do:
|
|
index:
|
|
index: test_1
|
|
type: test
|
|
id: id_1
|
|
body: { foo: "bar", number: 123 }
|
|
|
|
- do:
|
|
indices.refresh: {}
|
|
|
|
- do:
|
|
field_stats:
|
|
index: test_1
|
|
fields: [foo, number]
|
|
level: indices
|
|
|
|
- match: { indices.test_1.fields.foo.max_doc: 1 }
|
|
- match: { indices.test_1.fields.foo.doc_count: 1 }
|
|
- match: { indices.test_1.fields.foo.min_value: "bar" }
|
|
- match: { indices.test_1.fields.foo.max_value: "bar" }
|
|
- match: { indices.test_1.fields.number.max_doc: 1 }
|
|
- match: { indices.test_1.fields.number.doc_count: 1 }
|
|
- match: { indices.test_1.fields.number.min_value: 123 }
|
|
- match: { indices.test_1.fields.number.max_value: 123 }
|