ShardStores.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. namespace Elasticsearch\Endpoints\Indices;
  3. use Elasticsearch\Endpoints\AbstractEndpoint;
  4. use Elasticsearch\Common\Exceptions;
  5. /**
  6. * Class ShardStores
  7. *
  8. * @category Elasticsearch
  9. * @package Elasticsearch\Endpoints\Indices
  10. * @author Zachary Tong <zach@elastic.co>
  11. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2
  12. * @link http://elastic.co
  13. */
  14. class ShardStores extends AbstractEndpoint
  15. {
  16. /**
  17. * @throws \Elasticsearch\Common\Exceptions\RuntimeException
  18. * @return string
  19. */
  20. public function getURI()
  21. {
  22. $index = $this->index;
  23. $uri = "/_shard_stores";
  24. if (isset($index) === true) {
  25. $uri = "/$index/_shard_stores";
  26. }
  27. return $uri;
  28. }
  29. /**
  30. * @return string[]
  31. */
  32. public function getParamWhitelist()
  33. {
  34. return array(
  35. 'status',
  36. 'ignore_unavailable',
  37. 'allow_no_indices',
  38. 'expand_wildcards',
  39. 'operation_threading'
  40. );
  41. }
  42. /**
  43. * @return string
  44. */
  45. public function getMethod()
  46. {
  47. return 'GET';
  48. }
  49. }