lib/elasticsearch/api/actions/mtermvectors.rb in elasticsearch-api-6.1.0 vs lib/elasticsearch/api/actions/mtermvectors.rb in elasticsearch-api-6.2.0

- old
+ new

@@ -33,38 +33,41 @@ # # @see #mget # @see #termvector # def mtermvectors(arguments={}) - valid_params = [ - :ids, - :term_statistics, - :field_statistics, - :fields, - :offsets, - :positions, - :payloads, - :preference, - :realtime, - :routing, - :parent ] - ids = arguments.delete(:ids) method = HTTP_GET path = Utils.__pathify Utils.__escape(arguments[:index]), Utils.__escape(arguments[:type]), '_mtermvectors' - params = Utils.__validate_and_extract_params arguments, valid_params + params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) if ids body = { :ids => ids } else body = arguments[:body] end perform_request(method, path, params, body).body end + + # Register this action with its valid params when the module is loaded. + # + # @since 6.2.0 + ParamsRegistry.register(:mtermvectors, [ + :ids, + :term_statistics, + :field_statistics, + :fields, + :offsets, + :positions, + :payloads, + :preference, + :realtime, + :routing, + :parent ].freeze) end end end