Class: ProxES::Request::Search
- Inherits:
-
ProxES::Request
- Object
- Rack::Request
- ProxES::Request
- ProxES::Request::Search
- Defined in:
- lib/proxes/request/search.rb
Constant Summary
Constants inherited from ProxES::Request
Instance Attribute Summary collapse
-
#index ⇒ Object
Returns the value of attribute index.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
Methods inherited from ProxES::Request
from_env, #initialize, path_endpoint
Constructor Details
This class inherits a constructor from ProxES::Request
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 (readonly)
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
29 30 31 |
# File 'lib/proxes/request/search.rb', line 29 def id @id == [] ? nil : @id end |
#indices? ⇒ Boolean
33 34 35 |
# File 'lib/proxes/request/search.rb', line 33 def indices? type != ['scroll'] end |
#parse ⇒ Object
22 23 24 25 26 27 |
# File 'lib/proxes/request/search.rb', line 22 def parse p path_parts @index ||= check_part(path_parts[0]) @type ||= check_part(path_parts[1]) @id ||= check_part(path_parts[2]) end |