From 4ed675aa3c22c5dd09cbe1fc50835fa7bf8f5497 Mon Sep 17 00:00:00 2001 From: Garrett-R Date: Tue, 9 Feb 2016 00:06:09 -0800 Subject: [PATCH] Add docs for filter_path global parameter --- docs/api.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/api.rst b/docs/api.rst index 1d4d0864..e515aef7 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -63,6 +63,19 @@ connection class:: .. py:module:: elasticsearch +Response Filtering +~~~~~~~~~~~~~~~~~~ + +The `filter_path` parameter is used to reduce the response returned by +elasticsearch. For example, to only return `_id` and `_type`, do:: + + es.search(index='test-index', filter_path=['hits.hits._id', 'hits.hits._type']) + +It also supports the `*` wildcard character to match any field or part of a +field's name:: + + es.search(index='test-index', filter_path=['hits.hits._*']) + Elasticsearch -------------