Class: Chewy::Journal::Query
Instance Method Summary collapse
-
#initialize(time, comparator, indices, use_filter = true) ⇒ Query
constructor
A new instance of Query.
-
#to_h ⇒ Hash
ElasicSearch query.
Constructor Details
#initialize(time, comparator, indices, use_filter = true) ⇒ Query
Returns a new instance of Query.
8 9 10 11 12 13 |
# File 'lib/chewy/journal/query.rb', line 8 def initialize(time, comparator, indices, use_filter = true) @time = time @comparator = comparator @indices = indices || [] @use_filter = use_filter end |
Instance Method Details
#to_h ⇒ Hash
Returns ElasicSearch query.
16 17 18 |
# File 'lib/chewy/journal/query.rb', line 16 def to_h @query ||= { query: { filtered: filtered } } end |