class Chewy::Search::Parameters::Rescore
Stores data as an array of hashes, exactly the same way ES requires ‘rescore` to be provided.
@see Chewy::Search::Request#rescore @see www.elastic.co/guide/en/elasticsearch/reference/5.4/search-request-rescore.html
Public Instance Methods
update!(other_value)
click to toggle source
Adds new data to the existing data array.
@see Chewy::Search::Parameters::Storage#update!
@param other_value [Hash, Array<Hash>] any acceptable storage value @return [Array<Hash>] updated value
# File lib/chewy/search/parameters/rescore.rb, line 17 def update!(other_value) @value = value | normalize(other_value) end
Private Instance Methods
normalize(value)
click to toggle source
# File lib/chewy/search/parameters/rescore.rb, line 23 def normalize(value) Array.wrap(value).flatten(1).reject(&:blank?) end