public function deleteByType($type, $commit = true)
    {
        $this->deleteByQuery('type:' . trim($type));

        if ($commit) {
            $this->commit(false, false);
        }
    }
public function deleteByType($type, $commit = true)
    {
        $this->deleteByQuery('type:' . trim($type));

        if ($commit) {
            $this->commit(false, false);
        }
    }
public function deleteByType ( $ type , $ commit = true ) { $ this -> deleteByQuery ( 'type:' . trim ( $ type ) ) ; if ( $ commit ) { $ this -> commit ( false , false ) ; } }
Deletes all index documents of a certain type and does a commit
afterwards.

@param string $type The type of documents to delete, usually a table name.
@param bool $commit Will commit immediately after deleting the documents if set, defaults to TRUE
Deletes all index documents of a certain type and does a commit afterwards .