Class: ProxES::Request::Search
Constant Summary
ID_ENDPOINTS, WRITE_METHODS
Instance Attribute Summary collapse
Instance Method Summary
collapse
#detail, #duration, from_env, #html?, #initialize, path_endpoint, #user, #user_id
Instance Attribute Details
#index ⇒ Object
Returns the value of attribute index.
9
10
11
|
# File 'lib/proxes/request/search.rb', line 9
def index
@index
end
|
#type ⇒ Object
Returns the value of attribute type.
9
10
11
|
# File 'lib/proxes/request/search.rb', line 9
def type
@type
end
|
Instance Method Details
#endpoint ⇒ Object
18
19
20
|
# File 'lib/proxes/request/search.rb', line 18
def endpoint
'_search'
end
|
#id ⇒ Object
28
29
30
|
# File 'lib/proxes/request/search.rb', line 28
def id
@id == [] ? nil : @id
end
|
#indices ⇒ Object
36
37
38
|
# File 'lib/proxes/request/search.rb', line 36
def indices
@index || []
end
|
#indices? ⇒ Boolean
32
33
34
|
# File 'lib/proxes/request/search.rb', line 32
def indices?
type != ['scroll']
end
|
#parse ⇒ Object
22
23
24
25
26
|
# File 'lib/proxes/request/search.rb', line 22
def parse
@index ||= check_part(path_parts[0]) unless path_parts[0] == endpoint
@type ||= check_part(path_parts[1]) unless path_parts[1] == endpoint
@id ||= check_part(path_parts[2]) unless path_parts[2] == endpoint
end
|