Class: Elasticquery::BaseChain

Inherits:
Base
  • Object
show all
Defined in:
lib/elasticquery/es.rb

Instance Attribute Summary

Attributes inherited from Base

#params, #query

Instance Method Summary collapse

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

#recordsObject



12
13
14
# File 'lib/elasticquery/es.rb', line 12

def records
  results.records
end

#resultsObject



16
17
18
# File 'lib/elasticquery/es.rb', line 16

def results
  @klass.__elasticsearch__.search(build)
end