Filtering in PHP elasticsearch

Hi all, i'm working with elasticsearch PHP client and performed basic
search operation. Now i want to perform filter operation in search results.
The code is below

$params = array();
$params['index'] = "programs";
$params['type'] = 'program';
$query['match']['_all'] = $_POST['name'];
$filter['term']['tags'] = "sports";
$params['body']['query']['filtered'] = array(
'query' => $query,
'filter' => $filter
$results = $client->search($params);

The tags field contains (sports,health etc in comma separated) but it
returns nothing. I want to filter search result with like operation.How can
perform this?

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit