Module: DaedalSL::QueryHelpers

Includes:
Daedal::Filters, Daedal::Queries
Included in:
Builder
Defined in:
lib/daedal-sl/query_helpers.rb

Instance Method Summary collapse

Instance Method Details

#and_filter(options = {}, &block) ⇒ Object



6
7
8
# File 'lib/daedal-sl/query_helpers.rb', line 6

def and_filter(options={}, &block)
  DaedalSL::AndFilter.build(self, options, &block)
end

#bool_filter(options = {}, &block) ⇒ Object



10
11
12
# File 'lib/daedal-sl/query_helpers.rb', line 10

def bool_filter(options={}, &block)
  DaedalSL::BoolFilter.build(self, options, &block)
end

#bool_query(options = {}, &block) ⇒ Object



14
15
16
# File 'lib/daedal-sl/query_helpers.rb', line 14

def bool_query(options={}, &block)
  DaedalSL::BoolQuery.build(self, options, &block)
end

#constant_score(options) ⇒ Object



18
19
20
# File 'lib/daedal-sl/query_helpers.rb', line 18

def constant_score(options)
  ConstantScoreQuery.new(options)
end

#dis_max(options = {}, &block) ⇒ Object



22
23
24
# File 'lib/daedal-sl/query_helpers.rb', line 22

def dis_max(options={}, &block)
  DaedalSL::DisMaxQuery.build(self, options, &block)
end

#exists_filter(options) ⇒ Object



26
27
28
# File 'lib/daedal-sl/query_helpers.rb', line 26

def exists_filter(options)
  ExistsFilter.new(options)
end

#filtered_query(options) ⇒ Object



30
31
32
# File 'lib/daedal-sl/query_helpers.rb', line 30

def filtered_query(options)
  FilteredQuery.new(options)
end

#fuzzy(options) ⇒ Object



34
35
36
# File 'lib/daedal-sl/query_helpers.rb', line 34

def fuzzy(options)
  FuzzyQuery.new(options)
end

#geo_distance_filter(options) ⇒ Object



38
39
40
# File 'lib/daedal-sl/query_helpers.rb', line 38

def geo_distance_filter(options)
  GeoDistanceFilter.new(options)
end

#match(options) ⇒ Object



42
43
44
# File 'lib/daedal-sl/query_helpers.rb', line 42

def match(options)
  MatchQuery.new(options)
end

#match_allObject



46
47
48
# File 'lib/daedal-sl/query_helpers.rb', line 46

def match_all
  MatchAllQuery.new
end

#multi_match(options) ⇒ Object



50
51
52
# File 'lib/daedal-sl/query_helpers.rb', line 50

def multi_match(options)
  MultiMatchQuery.new(options)
end

#nested_bool_filter(options = {}, &block) ⇒ Object



58
59
60
# File 'lib/daedal-sl/query_helpers.rb', line 58

def nested_bool_filter(options={}, &block)
  DaedalSL::NestedBoolFilter.build(self, options, &block)
end

#nested_bool_query(options = {}, &block) ⇒ Object



54
55
56
# File 'lib/daedal-sl/query_helpers.rb', line 54

def nested_bool_query(options={}, &block)
  DaedalSL::NestedBoolQuery.build(self, options, &block)
end

#nested_dis_max_query(options = {}, &block) ⇒ Object



62
63
64
# File 'lib/daedal-sl/query_helpers.rb', line 62

def nested_dis_max_query(options={}, &block)
  DaedalSL::NestedDisMaxQuery.build(self, options, &block)
end

#or_filter(options = {}, &block) ⇒ Object



66
67
68
# File 'lib/daedal-sl/query_helpers.rb', line 66

def or_filter(options={}, &block)
  DaedalSL::OrFilter.build(self, options, &block)
end

#prefix(options) ⇒ Object



70
71
72
# File 'lib/daedal-sl/query_helpers.rb', line 70

def prefix(options)
  PrefixQuery.new(options)
end

#query_string(options) ⇒ Object



74
75
76
# File 'lib/daedal-sl/query_helpers.rb', line 74

def query_string(options)
  QueryStringQuery.new(options)
end

#range_filter(options) ⇒ Object



78
79
80
# File 'lib/daedal-sl/query_helpers.rb', line 78

def range_filter(options)
  RangeFilter.new(options)
end

#term_filter(options) ⇒ Object



82
83
84
# File 'lib/daedal-sl/query_helpers.rb', line 82

def term_filter(options)
  TermFilter.new(options)
end

#terms_filter(options) ⇒ Object



86
87
88
# File 'lib/daedal-sl/query_helpers.rb', line 86

def terms_filter(options)
  TermsFilter.new(options)
end