/**
  * Removes all documents from search index based on the specified type id.
  * Here search type id represents to id from, mongo tripod config, that is converted to _id.type in SEARCH_INDEX_COLLECTION
  * If type id is not specified this method will throw an exception.
  * @param string $typeId search type id
  * @return bool|array  response returned by mongo
  * @throws \Tripod\Exceptions\Exception if there was an error performing the operation
  */
 public function deleteSearchDocumentsByTypeId($typeId)
 {
     $searchSpec = $this->getSearchDocumentSpecification($typeId);
     if ($searchSpec == null) {
         throw new \Tripod\Exceptions\SearchException("Could not find a search specification for {$typeId}");
     }
     return $this->config->getCollectionForSearchDocument($this->storeName, $typeId)->deleteMany(array("_id.type" => $typeId));
 }