Class: EagleSearch::Interpreter::Query
- Inherits:
-
Object
- Object
- EagleSearch::Interpreter::Query
- Defined in:
- lib/eagle_search/interpreter/query.rb
Instance Method Summary collapse
-
#initialize(index, query, options) ⇒ Query
constructor
A new instance of Query.
- #payload ⇒ Object
Constructor Details
#initialize(index, query, options) ⇒ Query
Returns a new instance of Query.
3 4 5 6 7 |
# File 'lib/eagle_search/interpreter/query.rb', line 3 def initialize(index, query, ) @index = index @query = query @options = end |
Instance Method Details
#payload ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/eagle_search/interpreter/query.rb', line 9 def payload case @query when String if @query == "*" { match_all: {} } else query_payload end end end |