You are here

public function SearchApiViewsQuery::condition in Search API 7

Set a condition on the search query object.

If $group is given, the condition is added to the relevant filter group instead.

File

contrib/search_api_views/includes/query.inc, line 668
Contains SearchApiViewsQuery.

Class

SearchApiViewsQuery
Views query class using a Search API index as the data source.

Code

public function condition($field, $value, $operator = '=', $group = NULL) {
  if (!$this->errors) {
    $this->where[$group]['conditions'][] = array(
      $field,
      $value,
      $operator,
    );
  }
  return $this;
}