Method: Chewy::Search::Parameters::QueryStorage#should

Defined in:
lib/chewy/search/parameters/concerns/query_storage.rb

#should(other_value) ⇒ {Symbol => Array<Hash>}

Directly modifies should array of the root bool query. Pushes the passed query to the end of the array.

Parameters:

  • other_value (Hash, Array)

    any acceptable storage value

Returns:

  • ({Symbol => Array<Hash>})

See Also:



121
122
123
# File 'lib/chewy/search/parameters/concerns/query_storage.rb', line 121

def should(other_value)
  update!(should: other_value)
end