Module: Chewie::Interface::FullText
- Included in:
- Chewie
- Defined in:
- lib/chewie/interface/full_text.rb
Instance Method Summary collapse
- #match(attribute, context: :query, clause: nil, options: {}) ⇒ Hash
- #multimatch(with: [], context: :query, clause: nil, options: {}) ⇒ Hash
Instance Method Details
#match(attribute, context: :query, clause: nil, options: {}) ⇒ Hash
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/chewie/interface/full_text.rb', line 11 def match(attribute, context: :query, clause: nil, options: {}) handler = { query: :match, clause: clause, attribute: attribute, query_type: :full_text, options: , } set_handler(context: context, handler: handler) end |
#multimatch(with: [], context: :query, clause: nil, options: {}) ⇒ Hash
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/chewie/interface/full_text.rb', line 30 def multimatch(with: [], context: :query, clause: nil, options: {}) if context == :compound raise 'Please include a :clause value for compound queries.' end handler = { query: :multimatch, clause: clause, with: with, query_type: :full_text, options: , } set_handler(context: context, handler: handler) end |