66 lines
1.3 KiB
YAML
66 lines
1.3 KiB
YAML
|
# Integration tests for Mapper Murmur3 components
|
||
|
#
|
||
|
|
||
|
---
|
||
|
"Mapper Murmur3":
|
||
|
|
||
|
- do:
|
||
|
indices.create:
|
||
|
index: test
|
||
|
body:
|
||
|
mappings:
|
||
|
type1: { "properties": { "foo": { "type": "string", "fields": { "hash": { "type": "murmur3" } } } } }
|
||
|
|
||
|
- do:
|
||
|
index:
|
||
|
index: test
|
||
|
type: type1
|
||
|
id: 0
|
||
|
body: { "foo": null }
|
||
|
|
||
|
- do:
|
||
|
indices.refresh: {}
|
||
|
|
||
|
- do:
|
||
|
search:
|
||
|
body: { "aggs": { "foo_count": { "cardinality": { "field": "foo.hash" } } } }
|
||
|
|
||
|
- match: { aggregations.foo_count.value: 0 }
|
||
|
|
||
|
- do:
|
||
|
index:
|
||
|
index: test
|
||
|
type: type1
|
||
|
id: 1
|
||
|
body: { "foo": "bar" }
|
||
|
|
||
|
- do:
|
||
|
index:
|
||
|
index: test
|
||
|
type: type1
|
||
|
id: 2
|
||
|
body: { "foo": "baz" }
|
||
|
|
||
|
- do:
|
||
|
index:
|
||
|
index: test
|
||
|
type: type1
|
||
|
id: 3
|
||
|
body: { "foo": "quux" }
|
||
|
|
||
|
- do:
|
||
|
index:
|
||
|
index: test
|
||
|
type: type1
|
||
|
id: 4
|
||
|
body: { "foo": "bar" }
|
||
|
|
||
|
- do:
|
||
|
indices.refresh: {}
|
||
|
|
||
|
- do:
|
||
|
search:
|
||
|
body: { "aggs": { "foo_count": { "cardinality": { "field": "foo.hash" } } } }
|
||
|
|
||
|
- match: { aggregations.foo_count.value: 3 }
|