/** * Deletes records matching the given query. */ public function deleteByQuery($select, $commit = true) { $body = Json::encode(["delete" => ["query" => $select]]); $update = Solr::update()->body($body)->commit($commit); return $this->update($update); }