Skip to content

Commit 30e6fc4

Browse files
committed
[API] Added the fielddata_fields parameter to the Search API
Related: elastic/elasticsearch#11025
1 parent 2a7c2a2 commit 30e6fc4

File tree

1 file changed

+4
-0
lines changed
  • elasticsearch-api/lib/elasticsearch/api/actions

1 file changed

+4
-0
lines changed

elasticsearch-api/lib/elasticsearch/api/actions/search.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ module Actions
7676
# @option arguments [Boolean] :explain Specify whether to return detailed information about score computation
7777
# as part of a hit
7878
# @option arguments [List] :fields A comma-separated list of fields to return as part of a hit
79+
# @option arguments [List] :fielddata_fields A comma-separated list of fields to return as the field data
80+
# representation of a field for each hit
7981
# @option arguments [Number] :from Starting offset (default: 0)
8082
# @option arguments [String] :ignore_indices When performed on multiple indices, allows to ignore `missing` ones
8183
# (options: none, missing)
@@ -120,6 +122,7 @@ def search(arguments={})
120122
:default_operator,
121123
:df,
122124
:explain,
125+
:fielddata_fields,
123126
:fields,
124127
:from,
125128
:ignore_indices,
@@ -155,6 +158,7 @@ def search(arguments={})
155158
body = arguments[:body]
156159

157160
params[:fields] = Utils.__listify(params[:fields]) if params[:fields]
161+
params[:fielddata_fields] = Utils.__listify(params[:fielddata_fields]) if params[:fielddata_fields]
158162

159163
perform_request(method, path, params, body).body
160164
end

0 commit comments

Comments
 (0)