Elasticsearch: Implemented function drop_tables()

This commit is contained in:
Tomas Lang 2014-01-09 22:53:23 +01:00 committed by Jakub Vrana
parent 1bb436080b
commit b40bfb94f5

View file

@ -297,6 +297,19 @@ if (isset($_GET["elastic"])) {
return $connection->query(urlencode(implode(',', $databases)), array(), 'DELETE');
}
/** Drop tables
* @param array
* @return bool
*/
function drop_tables($tables) {
global $connection;
$result = true;
foreach ($tables as $table) { // convert to bulk api
$result = $result && $connection->query(urlencode($table), array(), 'DELETE');
}
return $result;
}
$jush = "elastic";
$operators = array("=", "query");
$functions = array();