Module: Eson::Shared::MultiSearch
- Extended by:
- API
- Defined in:
- lib/eson/shared/core/msearch.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from API
multi_index, multi_types, no_indices, parameters, register, source_param
Methods included from Chainable
#chainable, #extendable
Instance Attribute Details
#type ⇒ Object
Returns the value of attribute type.
6
7
8
|
# File 'lib/eson/shared/core/msearch.rb', line 6
def type
@type
end
|
Instance Method Details
#<<(request) ⇒ Object
18
19
20
|
# File 'lib/eson/shared/core/msearch.rb', line 18
def <<(request)
msearch << request
end
|
#msearch ⇒ Object
14
15
16
|
# File 'lib/eson/shared/core/msearch.rb', line 14
def msearch
@msearch ||= []
end
|
#search(args, immediate = true, &block) ⇒ Object
22
23
24
|
# File 'lib/eson/shared/core/msearch.rb', line 22
def search(args, immediate = true, &block)
self << client.search(args, false, &block)
end
|
#types ⇒ Object
26
27
28
29
30
31
32
33
34
|
# File 'lib/eson/shared/core/msearch.rb', line 26
def types
if @types
Array(@types)
elsif type
Array(type)
else
[]
end
end
|