Class: QueryBuilders

Inherits:
Object
  • Object
show all
Defined in:
lib/query_builders.rb

Overview

Factory class for query classes

Class Method Summary collapse

Class Method Details

.bool_queryQueries::BoolQueryBuilder

Returns bool_query_builder object.

Returns:



7
8
9
# File 'lib/query_builders.rb', line 7

def self.bool_query
  Queries::BoolQueryBuilder.new
end

.constant_score_query(*args) ⇒ Queries::ConstantScoreQueryBuilder

Returns constant_score_query_builder object.

Returns:



58
59
60
# File 'lib/query_builders.rb', line 58

def self.constant_score_query(*args)
  Queries::ConstantScoreQueryBuilder.new(*args)
end

.dis_max_queryQueries::DisMaxQueryBuilder

Returns dis_max_query_builder object.

Returns:



64
65
66
# File 'lib/query_builders.rb', line 64

def self.dis_max_query
  Queries::DisMaxQueryBuilder.new
end

.exists_query(*args) ⇒ Queries::ExistsQueryBuilder

Returns exists_query_builder object.

Returns:



50
51
52
# File 'lib/query_builders.rb', line 50

def self.exists_query(*args)
  Queries::ExistsQueryBuilder.new(*args)
end

.function_score_query(*args) ⇒ Queries::FunctionScorehQueryBuilder

Returns function_score_query_builder object.

Returns:

  • (Queries::FunctionScorehQueryBuilder)

    function_score_query_builder object



76
77
78
# File 'lib/query_builders.rb', line 76

def self.function_score_query(*args)
  Queries::FunctionScoreQueryBuilder.new(*args)
end

.geo_bounding_box_query(*args) ⇒ Queries::GeoDistanceQueryBuilder

Returns geo_bounding_box_query_builder object.

Returns:



110
111
112
# File 'lib/query_builders.rb', line 110

def self.geo_bounding_box_query(*args)
  Queries::GeoBoundingBoxQueryBuilder.new(*args)
end

.geo_distance_query(*args) ⇒ Queries::GeoDistanceQueryBuilder

Returns geo_distance_query_builder object.

Returns:



96
97
98
# File 'lib/query_builders.rb', line 96

def self.geo_distance_query(*args)
  Queries::GeoDistanceQueryBuilder.new(*args)
end

.match_all_queryQueries::MAtchAllQueryBuilder

Returns match_all_query_builder object.

Returns:

  • (Queries::MAtchAllQueryBuilder)

    match_all_query_builder object



102
103
104
# File 'lib/query_builders.rb', line 102

def self.match_all_query
  Queries::MatchAllQueryBuilder.new
end

.match_query(*args) ⇒ Queries::MatchQueryBuilder

Returns match_query_builder object.

Returns:



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

def self.match_query(*args)
  Queries::MatchQueryBuilder.new(*args)
end

.nested_query(*args) ⇒ Queries::NestedQueryBuilder

Returns nested_query_builder object.

Returns:



88
89
90
# File 'lib/query_builders.rb', line 88

def self.nested_query(*args)
  Queries::NestedQueryBuilder.new(*args)
end

.range_query(*args) ⇒ Queries::RangeQueryBuilder

Returns range_query_builder object.

Returns:



42
43
44
# File 'lib/query_builders.rb', line 42

def self.range_query(*args)
  Queries::RangeQueryBuilder.new(*args)
end

.term_query(*args) ⇒ Queries::TermQueryBuilder

Returns term_query_builder object.

Returns:



25
26
27
# File 'lib/query_builders.rb', line 25

def self.term_query(*args)
  Queries::TermQueryBuilder.new(*args)
end

.terms_query(*args) ⇒ Queries::TermsQueryBuilder

Returns terms_query_builder object.

Returns:



34
35
36
# File 'lib/query_builders.rb', line 34

def self.terms_query(*args)
  Queries::TermsQueryBuilder.new(*args)
end