Method: Chewy::Search::QueryProxy#must_not
- Defined in:
- lib/chewy/search/query_proxy.rb
#must_not(query_hash) ⇒ Chewy::Search::Request #must_not { ... } ⇒ Chewy::Search::Request
Executes Parameters::QueryStorage#must_not in the scope of newly created request object.
102 103 104 105 106 107 108 |
# File 'lib/chewy/search/query_proxy.rb', line 102 %i[must should must_not].each do |method| define_method method do |query_hash = nil, &block| raise ArgumentError, "Please provide a parameter or a block to `#{method}`" unless query_hash || block @request.send(:modify, @parameter_name) { send(method, block || query_hash) } end end |