Class: ElasticsearchDslBuilder::DSL::Search::Queries::Query
- Inherits:
-
Object
- Object
- ElasticsearchDslBuilder::DSL::Search::Queries::Query
- Defined in:
- lib/elasticsearch_dsl_builder/dsl/search/query.rb
Overview
Base class for query types
Direct Known Subclasses
Bool, Exists, FunctionScore, GeoBoundingBox, HasChild, HasParent, Ids, Match, MatchAll, MultiMatch, Nested, Range, Term, Terms, Wildcard
Instance Attribute Summary collapse
-
#query ⇒ Object
readonly
Returns the value of attribute query.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
Instance Attribute Details
#query ⇒ Object (readonly)
Returns the value of attribute query.
8 9 10 |
# File 'lib/elasticsearch_dsl_builder/dsl/search/query.rb', line 8 def query @query end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
8 9 10 |
# File 'lib/elasticsearch_dsl_builder/dsl/search/query.rb', line 8 def type @type end |
Instance Method Details
#to_hash ⇒ Object
10 11 12 13 14 |
# File 'lib/elasticsearch_dsl_builder/dsl/search/query.rb', line 10 def to_hash hash = {} hash.update(@type => @query) if @query hash end |