You are here

public function SearchApiElasticsearchElastica::getAssociativeFilter in Search API Elasticsearch 7

Helper function that return associative array of filters info.

Overrides SearchApiElasticsearchAbstractService::getAssociativeFilter

1 call to SearchApiElasticsearchElastica::getAssociativeFilter()
SearchApiElasticsearchElastica::parseFilter in modules/elastica/includes/SearchApiElasticsearchElastica.inc
Recursively parse Search API filters.

File

modules/elastica/includes/SearchApiElasticsearchElastica.inc, line 543
Provides Elastica client for Search API Elasticsearch.

Class

SearchApiElasticsearchElastica
Search API Elasticsearch Elastica service class.

Code

public 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,
  );
}