app/models/concerns/indexable.rb
# don't raise an exception when not found
don't raise an exception when not found
don ' t raise an exception when not found
def find_by_id(id, _options = {})
      return nil if id.blank?
      __elasticsearch__.find(id.downcase)
    rescue Elasticsearch::Transport::Transport::Errors::NotFound,
           Elasticsearch::Persistence::Repository::DocumentNotFound
      nil
    end
def find_by_id ( id , _options = { } ) return nil if id . blank? __elasticsearch__ . find ( id . downcase ) rescue Elasticsearch :: Transport :: Transport :: Errors :: NotFound , Elasticsearch :: Persistence :: Repository :: DocumentNotFound nil end
don't raise an exception when not found
don ' t raise an exception when not found
id
<not_specific>
_options
<not_specific>