10_basic.yaml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Integration tests for Mapper Murmur3 components
  2. #
  3. ---
  4. "Mapper Murmur3":
  5. - do:
  6. indices.create:
  7. index: test
  8. body:
  9. mappings:
  10. type1: { "properties": { "foo": { "type": "string", "fields": { "hash": { "type": "murmur3" } } } } }
  11. - do:
  12. index:
  13. index: test
  14. type: type1
  15. id: 0
  16. body: { "foo": null }
  17. - do:
  18. indices.refresh: {}
  19. - do:
  20. search:
  21. body: { "aggs": { "foo_count": { "cardinality": { "field": "foo.hash" } } } }
  22. - match: { aggregations.foo_count.value: 0 }
  23. - do:
  24. index:
  25. index: test
  26. type: type1
  27. id: 1
  28. body: { "foo": "bar" }
  29. - do:
  30. index:
  31. index: test
  32. type: type1
  33. id: 2
  34. body: { "foo": "baz" }
  35. - do:
  36. index:
  37. index: test
  38. type: type1
  39. id: 3
  40. body: { "foo": "quux" }
  41. - do:
  42. index:
  43. index: test
  44. type: type1
  45. id: 4
  46. body: { "foo": "bar" }
  47. - do:
  48. indices.refresh: {}
  49. - do:
  50. search:
  51. body: { "aggs": { "foo_count": { "cardinality": { "field": "foo.hash" } } } }
  52. - match: { aggregations.foo_count.value: 3 }