/** * {inheritDoc} */ public function set_granular_type_restrictions(array $restrictions) { $clauses = array(); foreach ($restrictions as $search_type => $contrib_types) { if (empty($contrib_types)) { continue; } $clauses[] = $this->query->lAnd($this->query->eq('type', $search_type), $this->in_set('parent_contrib_type', $contrib_types)); } $this->query->where($this->query->lOr($clauses)); return $this; }
/** * Deletes documents using the query $query. * * The $query should be created using {@link createDeleteQuery()}. * * @throws ezcSearchQueryException * if the delete query failed. * * @param ezcSearchDeleteQuery $query */ public function delete(ezcSearchDeleteQuery $query) { $result = $this->sendRawPostCommand('update', null, $query->getQuery()); $result = json_decode($result); }