You are here

protected function SearchApiElasticsearchAbstractService::getAssociativeFilter in Search API Elasticsearch 7

Helper function that return associative array of filters info.

1 call to SearchApiElasticsearchAbstractService::getAssociativeFilter()
SearchApiElasticsearchAbstractService::parseFilter in includes/SearchApiElasticsearchAbstractService.inc
Helper function: Recursively parse Search API filters.
1 method overrides SearchApiElasticsearchAbstractService::getAssociativeFilter()
SearchApiElasticsearchElastica::getAssociativeFilter in modules/elastica/includes/SearchApiElasticsearchElastica.inc
Helper function that return associative array of filters info.

File

includes/SearchApiElasticsearchAbstractService.inc, line 867
Provides a Elasticsearch-based service class for the Search API.

Class

SearchApiElasticsearchAbstractService
Elasticsearch service abstract class.

Code

protected function getAssociativeFilter(array $filter_info) {
  $filter_operator = str_replace('!=', '<>', $filter_info[2]);
  return array(
    'field_id' => $filter_info[0],
    'filter_value' => $filter_info[1],
    'filter_operator' => $filter_operator,
  );
}