1// query-dsl/query_filter_context.asciidoc:62
2
3[source, php]
4----
5$params = [
6    'body' => [
7        'query' => [
8            'bool' => [
9                'must' => [
10                    [
11                        'match' => [
12                            'title' => 'Search',
13                        ],
14                    ],
15                    [
16                        'match' => [
17                            'content' => 'Elasticsearch',
18                        ],
19                    ],
20                ],
21                'filter' => [
22                    [
23                        'term' => [
24                            'status' => 'published',
25                        ],
26                    ],
27                    [
28                        'range' => [
29                            'publish_date' => [
30                                'gte' => '2015-01-01',
31                            ],
32                        ],
33                    ],
34                ],
35            ],
36        ],
37    ],
38];
39$response = $client->search($params);
40----
41