Method: Elastictastic::Scope#multi_get_params
- Defined in:
- lib/elastictastic/scope.rb
#multi_get_params ⇒ Object
287 288 289 290 291 292 293 294 295 296 297 298 299 300 |
# File 'lib/elastictastic/scope.rb', line 287 def multi_get_params { '_type' => type, '_index' => @index.name }.tap do |params| params['fields'] = ::Kernel.Array(@search['fields']) if @search['fields'] if @routing params['routing'] = @routing elsif @clazz.routing_required? ::Kernel.raise ::Elastictastic::MissingParameter, "Must specify routing parameter to look up #{@clazz.name} by ID" end end end |