Module: Elasticquery::Builder
Instance Method Summary collapse
- #exists(*args) ⇒ Object
- #filters ⇒ Object
- #missing(*args) ⇒ Object
- #multi_match(*args) ⇒ Object
- #not(*args) ⇒ Object
- #queries ⇒ Object
- #range(*args) ⇒ Object
- #search(*args) ⇒ Object
- #term(*args) ⇒ Object
- #terms(*args) ⇒ Object
- #where(*args) ⇒ Object
- #with(*args) ⇒ Object
- #without(*args) ⇒ Object
Instance Method Details
#exists(*args) ⇒ Object
75 76 77 |
# File 'lib/elasticquery/builder.rb', line 75 def exists(*args) execute "exists", *args end |
#filters ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/elasticquery/builder.rb', line 16 def filters @namespace = "Filters" if block_given? yield @namespace = nil end self end |
#missing(*args) ⇒ Object
82 83 84 |
# File 'lib/elasticquery/builder.rb', line 82 def missing(*args) exists.not *args end |
#multi_match(*args) ⇒ Object
68 69 70 |
# File 'lib/elasticquery/builder.rb', line 68 def multi_match(*args) execute "multi_match", *args end |
#not(*args) ⇒ Object
60 61 62 |
# File 'lib/elasticquery/builder.rb', line 60 def not(*args) execute "not", *args end |
#queries ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'lib/elasticquery/builder.rb', line 25 def queries @namespace = "Queries" if block_given? yield @namespace = nil end self end |
#range(*args) ⇒ Object
64 65 66 |
# File 'lib/elasticquery/builder.rb', line 64 def range(*args) execute "range", *args end |
#search(*args) ⇒ Object
71 72 73 |
# File 'lib/elasticquery/builder.rb', line 71 def search(*args) multi_match *args end |
#term(*args) ⇒ Object
49 50 51 |
# File 'lib/elasticquery/builder.rb', line 49 def term(*args) execute "term", *args end |
#terms(*args) ⇒ Object
53 54 55 |
# File 'lib/elasticquery/builder.rb', line 53 def terms(*args) execute "terms", *args end |
#where(*args) ⇒ Object
56 57 58 |
# File 'lib/elasticquery/builder.rb', line 56 def where(*args) terms *args end |
#with(*args) ⇒ Object
78 79 80 |
# File 'lib/elasticquery/builder.rb', line 78 def with(*args) exists *args end |
#without(*args) ⇒ Object
85 86 87 |
# File 'lib/elasticquery/builder.rb', line 85 def without(*args) missing *args end |