-
Notifications
You must be signed in to change notification settings - Fork 964
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update endpoints to be 1.0 compatible
- Loading branch information
1 parent
86c0c98
commit 2453a7e
Showing
70 changed files
with
2,743 additions
and
1,041 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<?php | ||
/** | ||
* User: zach | ||
* Date: 01/20/2014 | ||
* Time: 14:34:49 pm | ||
*/ | ||
|
||
namespace Elasticsearch\Endpoints; | ||
|
||
use Elasticsearch\Endpoints\AbstractEndpoint; | ||
use Elasticsearch\Common\Exceptions; | ||
|
||
/** | ||
* Class Clearscroll | ||
* | ||
* @category Elasticsearch | ||
* @package Elasticsearch\Endpoints | ||
* @author Zachary Tong <[email protected]> | ||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 | ||
* @link http://elasticsearch.org | ||
*/ | ||
|
||
class Clearscroll extends AbstractEndpoint | ||
{ | ||
// A comma-separated list of scroll IDs to clear | ||
private $scroll_id; | ||
|
||
|
||
/** | ||
* @param $scroll_id | ||
* | ||
* @return $this | ||
*/ | ||
public function setScroll_Id($scroll_id) | ||
{ | ||
if (isset($scroll_id) !== true) { | ||
return $this; | ||
} | ||
|
||
$this->scroll_id = $scroll_id; | ||
return $this; | ||
} | ||
|
||
|
||
/** | ||
* @throws \Elasticsearch\Common\Exceptions\RuntimeException | ||
* @return string | ||
*/ | ||
protected function getURI() | ||
{ | ||
if (isset($this->scroll_id) !== true) { | ||
throw new Exceptions\RuntimeException( | ||
'scroll_id is required for Clearscroll' | ||
); | ||
} | ||
$scroll_id = $this->scroll_id; | ||
$uri = "/_search/scroll/$scroll_id"; | ||
|
||
if (isset($scroll_id) === true) { | ||
$uri = "/_search/scroll/$scroll_id"; | ||
} | ||
|
||
return $uri; | ||
} | ||
|
||
|
||
/** | ||
* @return string[] | ||
*/ | ||
protected function getParamWhitelist() | ||
{ | ||
return array( | ||
); | ||
} | ||
|
||
|
||
/** | ||
* @return string | ||
*/ | ||
protected function getMethod() | ||
{ | ||
return 'DELETE'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<?php | ||
/** | ||
* User: zach | ||
* Date: 05/31/2013 | ||
* Time: 16:47:11 pm | ||
* Date: 01/20/2014 | ||
* Time: 14:34:49 pm | ||
*/ | ||
|
||
namespace Elasticsearch\Endpoints\Cluster; | ||
|
@@ -12,26 +12,32 @@ | |
|
||
/** | ||
* Class Health | ||
* | ||
* @category Elasticsearch | ||
* @package Elasticsearch\Endpoints\Cluster | ||
* @author Zachary Tong <[email protected]> | ||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 | ||
* @link http://elasticsearch.org | ||
*/ | ||
|
||
class Health extends AbstractEndpoint | ||
{ | ||
|
||
/** | ||
* @return string | ||
*/ | ||
protected function getURI() | ||
{ | ||
|
||
$index = $this->index; | ||
$uri = "/_cluster/health"; | ||
|
||
if (isset($index) === true) { | ||
$uri = "/_cluster/health/$index"; | ||
} | ||
|
||
return $uri; | ||
} | ||
|
||
|
||
/** | ||
* @return string[] | ||
*/ | ||
|
@@ -49,6 +55,7 @@ protected function getParamWhitelist() | |
); | ||
} | ||
|
||
|
||
/** | ||
* @return string | ||
*/ | ||
|
43 changes: 0 additions & 43 deletions
43
src/Elasticsearch/Endpoints/Cluster/Node/AbstractNodeEndpoint.php
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.