Class: Elasticquery::BaseChain
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(klass) ⇒ BaseChain
constructor
A new instance of BaseChain.
- #records ⇒ Object
- #results ⇒ Object
Methods inherited from Base
#build, build, #filterable?, filtered
Methods included from Builder
#exists, #filters, #missing, #multi_match, #not, #queries, #range, #search, #term, #terms, #where, #with, #without
Constructor Details
#initialize(klass) ⇒ BaseChain
Returns a new instance of BaseChain.
5 6 7 8 |
# File 'lib/elasticquery/es.rb', line 5 def initialize(klass) @klass = klass super end |
Instance Method Details
#records ⇒ Object
12 13 14 |
# File 'lib/elasticquery/es.rb', line 12 def records results.records end |
#results ⇒ Object
16 17 18 |
# File 'lib/elasticquery/es.rb', line 16 def results @klass.__elasticsearch__.search(build) end |