Class: Chewy::Search::Parameters::Rescore

Inherits:
Storage show all
Defined in:
lib/chewy/search/parameters/rescore.rb

Overview

Stores data as an array of hashes, exactly the same way ES requires rescore to be provided.

Instance Attribute Summary

Attributes inherited from Storage

#value

Instance Method Summary collapse

Methods inherited from Storage

#==, #initialize, #merge!, #render, #replace!

Constructor Details

This class inherits a constructor from Chewy::Search::Parameters::Storage

Instance Method Details

#update!(other_value) ⇒ Array<Hash>

Adds new data to the existing data array.

Parameters:

  • other_value (Hash, Array<Hash>)

    any acceptable storage value

Returns:

See Also:



17
18
19
# File 'lib/chewy/search/parameters/rescore.rb', line 17

def update!(other_value)
  @value = value | normalize(other_value)
end