BucketInterface.php 834 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Search\Request;
  7. /**
  8. * Aggregation Bucket Interface
  9. *
  10. * @api
  11. * @since 100.0.2
  12. */
  13. interface BucketInterface
  14. {
  15. /**
  16. * #@+ Bucket Types
  17. */
  18. const TYPE_TERM = 'termBucket';
  19. const TYPE_RANGE = 'rangeBucket';
  20. const TYPE_DYNAMIC = 'dynamicBucket';
  21. const FIELD_VALUE = 'value';
  22. /**#@-*/
  23. /**
  24. * Get Type
  25. *
  26. * @return string
  27. */
  28. public function getType();
  29. /**
  30. * Get Field
  31. *
  32. * @return string
  33. */
  34. public function getField();
  35. /**
  36. * Get Metrics
  37. *
  38. * @return array
  39. */
  40. public function getMetrics();
  41. /**
  42. * Get Name
  43. *
  44. * @return string
  45. */
  46. public function getName();
  47. }