Refresh.php 1015 B

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