Skip to content

Commit 4ed675a

Browse files
committed
Add docs for filter_path global parameter
1 parent 271376f commit 4ed675a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/api.rst

+13
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,19 @@ connection class::
6363

6464
.. py:module:: elasticsearch
6565
66+
Response Filtering
67+
~~~~~~~~~~~~~~~~~~
68+
69+
The `filter_path` parameter is used to reduce the response returned by
70+
elasticsearch. For example, to only return `_id` and `_type`, do::
71+
72+
es.search(index='test-index', filter_path=['hits.hits._id', 'hits.hits._type'])
73+
74+
It also supports the `*` wildcard character to match any field or part of a
75+
field's name::
76+
77+
es.search(index='test-index', filter_path=['hits.hits._*'])
78+
6679
Elasticsearch
6780
-------------
6881

0 commit comments

Comments
 (0)