Module: ROM::Elasticsearch::Plugins::Relation::QueryDSL::InstanceMethods

Defined in:
lib/rom/elasticsearch/plugins/relation/query_dsl.rb

Instance Method Summary collapse

Instance Method Details

#search(options = EMPTY_HASH, &block) ⇒ Relation

Restrict a relation via query DSL



31
32
33
34
35
36
37
# File 'lib/rom/elasticsearch/plugins/relation/query_dsl.rb', line 31

def search(options = EMPTY_HASH, &block)
  if block
    super(query_builder.search(&block).to_hash)
  else
    super
  end
end