Class: Elos::Index::Attributes::KeysGuesser

Inherits:
Object
  • Object
show all
Defined in:
lib/elos/index/attributes/keys_guesser.rb

Class Method Summary collapse

Class Method Details

.guess(given_mappings, mappings_fields) ⇒ Object



2
3
4
# File 'lib/elos/index/attributes/keys_guesser.rb', line 2

def self.guess(given_mappings, mappings_fields)
  %i(id) + (given_mappings.try(:[], :properties) || {}).merge(mappings_fields || {}).keys
end