PhpOrient - dataClusterDrop()

This method drops the given cluster.

Dropping Clusters

In certain situations, you may find it useful to programmatically remove clusters from the database. For instance, in the case of a maintenance script that frees up space when the given cluster is no longer needed. This method allows you to remove clusters by their Cluster ID, which is the first number in a Record ID.


  • <cluster-id> Defines the Cluster ID to remove.


Consider the example of a web application that uses multiple in-memory clusters for short term needs. For this purpose, you might want a function to quickly remove these clusters when you're finished using them.

function removeCluster($clusterId){

    // Log Operation
    echo "Removing Cluster: $clusterId";

    // Fetch Global Client
    global $client;

    // Remove Cluster

results matching ""

    No results matching ""