1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- # 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 }
|