Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue caused by 7.x breaking change (_source_include/_source_exclude) #1019

Merged
merged 1 commit into from
Sep 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 22 additions & 44 deletions elasticsearch/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,7 @@ def index(self, index, body, doc_type="_doc", id=None, params=None):

@query_params(
"_source",
"_source_exclude",
"_source_excludes",
"_source_include",
"_source_includes",
"parent",
"preference",
Expand All @@ -388,9 +386,9 @@ def exists(self, index, id, doc_type="_doc", params=None):
:arg id: The document ID
:arg _source: True or false to return the _source field or not, or a
list of fields to return
:arg _source_exclude: A list of fields to exclude from the returned
:arg _source_excludes: A list of fields to exclude from the returned
_source field
:arg _source_include: A list of fields to extract and return from the
:arg _source_includes: A list of fields to extract and return from the
_source field
:arg parent: The ID of the parent document
:arg preference: Specify the node or shard the operation should be
Expand All @@ -415,9 +413,7 @@ def exists(self, index, id, doc_type="_doc", params=None):

@query_params(
"_source",
"_source_exclude",
"_source_excludes",
"_source_include",
"_source_includes",
"parent",
"preference",
Expand All @@ -435,9 +431,9 @@ def exists_source(self, index, id, doc_type=None, params=None):
:arg id: The document ID
:arg _source: True or false to return the _source field or not, or a
list of fields to return
:arg _source_exclude: A list of fields to exclude from the returned
:arg _source_excludes: A list of fields to exclude from the returned
_source field
:arg _source_include: A list of fields to extract and return from the
:arg _source_includes: A list of fields to extract and return from the
_source field
:arg parent: The ID of the parent document
:arg preference: Specify the node or shard the operation should be
Expand All @@ -460,9 +456,7 @@ def exists_source(self, index, id, doc_type=None, params=None):

@query_params(
"_source",
"_source_exclude",
"_source_excludes",
"_source_include",
"_source_includes",
"parent",
"preference",
Expand All @@ -482,9 +476,9 @@ def get(self, index, id, doc_type="_doc", params=None):
:arg id: The document ID
:arg _source: True or false to return the _source field or not, or a
list of fields to return
:arg _source_exclude: A list of fields to exclude from the returned
:arg _source_excludes: A list of fields to exclude from the returned
_source field
:arg _source_include: A list of fields to extract and return from the
:arg _source_includes: A list of fields to extract and return from the
_source field
:arg parent: The ID of the parent document
:arg preference: Specify the node or shard the operation should be
Expand All @@ -509,9 +503,7 @@ def get(self, index, id, doc_type="_doc", params=None):

@query_params(
"_source",
"_source_exclude",
"_source_excludes",
"_source_include",
"_source_includes",
"parent",
"preference",
Expand All @@ -530,9 +522,9 @@ def get_source(self, index, id, doc_type="_doc", params=None):
:arg id: The document ID
:arg _source: True or false to return the _source field or not, or a
list of fields to return
:arg _source_exclude: A list of fields to exclude from the returned
:arg _source_excludes: A list of fields to exclude from the returned
_source field
:arg _source_include: A list of fields to extract and return from the
:arg _source_includes: A list of fields to extract and return from the
_source field
:arg parent: The ID of the parent document
:arg preference: Specify the node or shard the operation should be
Expand All @@ -555,9 +547,7 @@ def get_source(self, index, id, doc_type="_doc", params=None):

@query_params(
"_source",
"_source_exclude",
"_source_excludes",
"_source_include",
"_source_includes",
"preference",
"realtime",
Expand All @@ -576,9 +566,9 @@ def mget(self, body, doc_type=None, index=None, params=None):
:arg index: The name of the index
:arg _source: True or false to return the _source field or not, or a
list of fields to return
:arg _source_exclude: A list of fields to exclude from the returned
:arg _source_excludes: A list of fields to exclude from the returned
_source field
:arg _source_include: A list of fields to extract and return from the
:arg _source_includes: A list of fields to extract and return from the
_source field
:arg preference: Specify the node or shard the operation should be
performed on (default: random)
Expand All @@ -598,9 +588,7 @@ def mget(self, body, doc_type=None, index=None, params=None):

@query_params(
"_source",
"_source_exclude",
"_source_excludes",
"_source_include",
"_source_includes",
"fields",
"if_seq_no",
Expand All @@ -627,9 +615,9 @@ def update(self, index, id, doc_type="_doc", body=None, params=None):
:arg body: The request definition using either `script` or partial `doc`
:arg _source: True or false to return the _source field or not, or a
list of fields to return
:arg _source_exclude: A list of fields to exclude from the returned
:arg _source_excludes: A list of fields to exclude from the returned
_source field
:arg _source_include: A list of fields to extract and return from the
:arg _source_includes: A list of fields to extract and return from the
_source field
:arg fields: A comma-separated list of fields to return in the response
:arg if_seq_no:
Expand Down Expand Up @@ -666,9 +654,7 @@ def update(self, index, id, doc_type="_doc", body=None, params=None):

@query_params(
"_source",
"_source_exclude",
"_source_excludes",
"_source_include",
"_source_includes",
"allow_no_indices",
"allow_partial_search_results",
Expand Down Expand Up @@ -721,9 +707,9 @@ def search(self, index=None, body=None, params=None):
:arg body: The search definition using the Query DSL
:arg _source: True or false to return the _source field or not, or a
list of fields to return
:arg _source_exclude: A list of fields to exclude from the returned
:arg _source_excludes: A list of fields to exclude from the returned
_source field
:arg _source_include: A list of fields to extract and return from the
:arg _source_includes: A list of fields to extract and return from the
_source field
:arg allow_no_indices: Whether to ignore if a wildcard indices
expression resolves into no concrete indices. (This includes `_all`
Expand Down Expand Up @@ -821,9 +807,7 @@ def search(self, index=None, body=None, params=None):

@query_params(
"_source",
"_source_exclude",
"_source_excludes",
"_source_include",
"_source_includes",
"allow_no_indices",
"analyze_wildcard",
Expand Down Expand Up @@ -868,9 +852,9 @@ def update_by_query(self, index, body=None, params=None):
:arg body: The search definition using the Query DSL
:arg _source: True or false to return the _source field or not, or a
list of fields to return
:arg _source_exclude: A list of fields to exclude from the returned
:arg _source_excludes: A list of fields to exclude from the returned
_source field
:arg _source_include: A list of fields to extract and return from the
:arg _source_includes: A list of fields to extract and return from the
_source field
:arg allow_no_indices: Whether to ignore if a wildcard indices
expression resolves into no concrete indices. (This includes `_all`
Expand Down Expand Up @@ -1015,9 +999,7 @@ def reindex_rethrottle(self, task_id=None, params=None):

@query_params(
"_source",
"_source_exclude",
"_source_excludes",
"_source_include",
"_source_includes",
"allow_no_indices",
"analyze_wildcard",
Expand Down Expand Up @@ -1060,9 +1042,9 @@ def delete_by_query(self, index, body, params=None):
:arg body: The search definition using the Query DSL
:arg _source: True or false to return the _source field or not, or a
list of fields to return
:arg _source_exclude: A list of fields to exclude from the returned
:arg _source_excludes: A list of fields to exclude from the returned
_source field
:arg _source_include: A list of fields to extract and return from the
:arg _source_includes: A list of fields to extract and return from the
_source field
:arg allow_no_indices: Whether to ignore if a wildcard indices
expression resolves into no concrete indices. (This includes `_all`
Expand Down Expand Up @@ -1242,9 +1224,7 @@ def search_template(self, index=None, body=None, params=None):

@query_params(
"_source",
"_source_exclude",
"_source_excludes",
"_source_include",
"_source_includes",
"analyze_wildcard",
"analyzer",
Expand All @@ -1269,9 +1249,9 @@ def explain(self, index, id, doc_type="_doc", body=None, params=None):
:arg body: The query definition using the Query DSL
:arg _source: True or false to return the _source field or not, or a
list of fields to return
:arg _source_exclude: A list of fields to exclude from the returned
:arg _source_excludes: A list of fields to exclude from the returned
_source field
:arg _source_include: A list of fields to extract and return from the
:arg _source_includes: A list of fields to extract and return from the
_source field
:arg analyze_wildcard: Specify whether wildcards and prefix queries in
the query string query should be analyzed (default: false)
Expand Down Expand Up @@ -1450,9 +1430,7 @@ def count(self, doc_type=None, index=None, body=None, params=None):

@query_params(
"_source",
"_source_exclude",
"_source_excludes",
"_source_include",
"_source_includes",
"fields",
"pipeline",
Expand All @@ -1475,9 +1453,9 @@ def bulk(self, body, doc_type=None, index=None, params=None):
:arg _source: True or false to return the _source field or not, or
default list of fields to return, can be overridden on each sub-
request
:arg _source_exclude: Default list of fields to exclude from the
:arg _source_excludes: Default list of fields to exclude from the
returned _source field, can be overridden on each sub-request
:arg _source_include: Default list of fields to extract and return from
:arg _source_includes: Default list of fields to extract and return from
the _source field, can be overridden on each sub-request
:arg fields: Default comma-separated list of fields to return in the
response for updates, can be overridden on each sub-request
Expand Down