public function objectIndexActionRequired($object, Client $client = null)
    {
        $type = $this->getIndexTypeForObject($object, $client);
        if ($type === null) {
            return null;
        }
        $id = $this->persistenceManager->getIdentifierByObject($object);
        $document = $type->findDocumentById($id);
        if ($document !== null) {
            $objectData = $this->getIndexablePropertiesAndValuesFromObject($object);
            if (strcmp(json_encode($objectData), json_encode($document->getData())) === 0) {
                $actionType = null;
            } else {
                $actionType = self::ACTION_TYPE_UPDATE;
            }
        } else {
            $actionType = self::ACTION_TYPE_CREATE;
        }

        return $actionType;
    }