public function update($id)
    {
        // set schema to sql
        $this->sql->setSchema($this->schema);
        // get data from sql
        $body = $this->sql->get($this->schema->getPrimaryFieldName(), $id);

        if (!is_array($body) || empty($body)) {
            return false;
        }

        try {
            return $this->resource->update(
                [
                    'index' => $this->schema->getName(),
                    'type' => static::INDEX_TYPE,
                    'id' => $id,
                    'body' => [
                        'doc' => $body
                    ]
                ]
            );
        } catch (Missing404Exception $e) {
            return false;
        } catch (NoNodesAvailableException $e) {
            return false;
        } catch (\Throwable $e) {
            // catch all throwable
            // if something went wrong, dont panic, just return false
            return false;
        }
    }