Module: DaedalSL::QueryHelpers
- Includes:
- Daedal::Filters, Daedal::Queries
- Included in:
- Builder
- Defined in:
- lib/daedal-sl/query_helpers.rb
Instance Method Summary collapse
- #and_filter(options = {}, &block) ⇒ Object
- #bool_filter(options = {}, &block) ⇒ Object
- #bool_query(options = {}, &block) ⇒ Object
- #constant_score(options) ⇒ Object
- #dis_max(options = {}, &block) ⇒ Object
- #exists_filter(options) ⇒ Object
- #filtered_query(options) ⇒ Object
- #fuzzy(options) ⇒ Object
- #geo_distance_filter(options) ⇒ Object
- #match(options) ⇒ Object
- #match_all ⇒ Object
- #multi_match(options) ⇒ Object
- #nested_bool_filter(options = {}, &block) ⇒ Object
- #nested_bool_query(options = {}, &block) ⇒ Object
- #nested_dis_max_query(options = {}, &block) ⇒ Object
- #or_filter(options = {}, &block) ⇒ Object
- #prefix(options) ⇒ Object
- #query_string(options) ⇒ Object
- #range_filter(options) ⇒ Object
- #term_filter(options) ⇒ Object
- #terms_filter(options) ⇒ Object
Instance Method Details
#and_filter(options = {}, &block) ⇒ Object
6 7 8 |
# File 'lib/daedal-sl/query_helpers.rb', line 6 def and_filter(={}, &block) DaedalSL::AndFilter.build(self, , &block) end |
#bool_filter(options = {}, &block) ⇒ Object
10 11 12 |
# File 'lib/daedal-sl/query_helpers.rb', line 10 def bool_filter(={}, &block) DaedalSL::BoolFilter.build(self, , &block) end |
#bool_query(options = {}, &block) ⇒ Object
14 15 16 |
# File 'lib/daedal-sl/query_helpers.rb', line 14 def bool_query(={}, &block) DaedalSL::BoolQuery.build(self, , &block) end |
#constant_score(options) ⇒ Object
18 19 20 |
# File 'lib/daedal-sl/query_helpers.rb', line 18 def constant_score() ConstantScoreQuery.new() end |
#dis_max(options = {}, &block) ⇒ Object
22 23 24 |
# File 'lib/daedal-sl/query_helpers.rb', line 22 def dis_max(={}, &block) DaedalSL::DisMaxQuery.build(self, , &block) end |
#exists_filter(options) ⇒ Object
26 27 28 |
# File 'lib/daedal-sl/query_helpers.rb', line 26 def exists_filter() ExistsFilter.new() end |
#filtered_query(options) ⇒ Object
30 31 32 |
# File 'lib/daedal-sl/query_helpers.rb', line 30 def filtered_query() FilteredQuery.new() end |
#fuzzy(options) ⇒ Object
34 35 36 |
# File 'lib/daedal-sl/query_helpers.rb', line 34 def fuzzy() FuzzyQuery.new() end |
#geo_distance_filter(options) ⇒ Object
38 39 40 |
# File 'lib/daedal-sl/query_helpers.rb', line 38 def geo_distance_filter() GeoDistanceFilter.new() end |
#match(options) ⇒ Object
42 43 44 |
# File 'lib/daedal-sl/query_helpers.rb', line 42 def match() MatchQuery.new() end |
#match_all ⇒ Object
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() MultiMatchQuery.new() end |
#nested_bool_filter(options = {}, &block) ⇒ Object
58 59 60 |
# File 'lib/daedal-sl/query_helpers.rb', line 58 def nested_bool_filter(={}, &block) DaedalSL::NestedBoolFilter.build(self, , &block) end |
#nested_bool_query(options = {}, &block) ⇒ Object
54 55 56 |
# File 'lib/daedal-sl/query_helpers.rb', line 54 def nested_bool_query(={}, &block) DaedalSL::NestedBoolQuery.build(self, , &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(={}, &block) DaedalSL::NestedDisMaxQuery.build(self, , &block) end |
#or_filter(options = {}, &block) ⇒ Object
66 67 68 |
# File 'lib/daedal-sl/query_helpers.rb', line 66 def or_filter(={}, &block) DaedalSL::OrFilter.build(self, , &block) end |
#prefix(options) ⇒ Object
70 71 72 |
# File 'lib/daedal-sl/query_helpers.rb', line 70 def prefix() PrefixQuery.new() end |
#query_string(options) ⇒ Object
74 75 76 |
# File 'lib/daedal-sl/query_helpers.rb', line 74 def query_string() QueryStringQuery.new() end |
#range_filter(options) ⇒ Object
78 79 80 |
# File 'lib/daedal-sl/query_helpers.rb', line 78 def range_filter() RangeFilter.new() end |
#term_filter(options) ⇒ Object
82 83 84 |
# File 'lib/daedal-sl/query_helpers.rb', line 82 def term_filter() TermFilter.new() end |
#terms_filter(options) ⇒ Object
86 87 88 |
# File 'lib/daedal-sl/query_helpers.rb', line 86 def terms_filter() TermsFilter.new() end |