Module: Eson::Shared::MultiSearch

Extended by:
API
Defined in:
lib/eson/shared/core/msearch.rb

Overview

Note:

The request supports the following parameters: msearch, types

Note:

The request declares the following parameters as source parameters: msearch

Note:

The request can operate on multiple indices.

Note:

Requests using this API have the following properties:

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from API

multi_types, no_indices

Methods included from Chainable

#chainable, #extendable

Instance Attribute Details

#typeObject

Returns the value of attribute type.



12
13
14
# File 'lib/eson/shared/core/msearch.rb', line 12

def type
  @type
end

Instance Method Details

#<<(request) ⇒ Object



27
28
29
# File 'lib/eson/shared/core/msearch.rb', line 27

def <<(request)
  msearch << request
end

#msearchObject



23
24
25
# File 'lib/eson/shared/core/msearch.rb', line 23

def msearch
  @msearch ||= []
end

#multi_indextrue

The request can operate on multiple indices.

Returns:

  • (true)


15
# File 'lib/eson/shared/core/msearch.rb', line 15

multi_index true

#parametersArray<String>

The request supports the following parameters: msearch, types

Returns:

  • (Array<String>)

    The parameters



20
21
# File 'lib/eson/shared/core/msearch.rb', line 20

parameters :msearch,
:types

#search(args, immediate = true, &block) ⇒ Object



31
32
33
# File 'lib/eson/shared/core/msearch.rb', line 31

def search(args, immediate = true, &block)
  self << client.search(args, false, &block)
end

#source_paramArray<String>

The request declares the following parameters as source parameters: msearch

Returns:

  • (Array<String>)

    The source parameters



18
# File 'lib/eson/shared/core/msearch.rb', line 18

source_param :msearch

#typesObject



35
36
37
38
39
40
41
42
43
# File 'lib/eson/shared/core/msearch.rb', line 35

def types
  if @types
    Array(@types)
  elsif type
    Array(type)
  else
    []
  end
end