You are here

function SearchApiStringFilter::add_where_expression in Search API Extended String Filter 7

File

includes/handler_filter_string.inc, line 366

Class

SearchApiStringFilter

Code

function add_where_expression($group, $snippet, $args = array()) {

  // Ensure all variants of 0 are actually 0. Thus '', 0 and NULL are all
  // the default group.
  if (empty($group)) {
    $group = 0;
  }

  // Check for a group.
  if (!isset($this->query->where[$group])) {
    $this
      ->set_where_group('AND', $group);
  }
  $this->query->where[$group]['conditions'][] = array(
    'field' => $snippet,
    'value' => $args,
    'operator' => 'formula',
  );
}