/** * Create an array containing only the available document property values. * * @param \Searchperience\Api\Client\Domain\Document\Document $document * @return array */ protected function buildRequestArray(\Searchperience\Api\Client\Domain\AbstractEntity $document) { $valueArray = array(); if ($document->getLastProcessingDate() instanceof \DateTime) { $valueArray['lastProcessing'] = $this->dateTimeService->getDateStringFromDateTime($document->getLastProcessingDate()); } if (!is_null($document->getBoostFactor())) { $valueArray['boostFactor'] = $document->getBoostFactor(); } if (!is_null($document->getIsProminent())) { $valueArray['isProminent'] = $document->getIsProminent(); } if (!is_null($document->getIsMarkedForProcessing())) { $valueArray['isMarkedForProcessing'] = $document->getIsMarkedForProcessing(); } if (!is_null($document->getIsMarkedForDeletion())) { $valueArray['isMarkedForDeletion'] = $document->getIsMarkedForDeletion(); } if (!is_null($document->getNoIndex())) { $valueArray['noIndex'] = $document->getNoIndex(); } if (!is_null($document->getForeignId())) { $valueArray['foreignId'] = $document->getForeignId(); } if (!is_null($document->getUrl())) { $valueArray['url'] = $document->getUrl(); } if (!is_null($document->getSource())) { $valueArray['source'] = $document->getSource(); } if (!is_null($document->getMimeType())) { $valueArray['mimeType'] = $document->getMimeType(); } if (!is_null($document->getContent())) { $valueArray['content'] = $document->getContent(); } if (!is_null($document->getGeneralPriority())) { $valueArray['generalPriority'] = $document->getGeneralPriority(); } if (!is_null($document->getTemporaryPriority())) { $valueArray['temporaryPriority'] = $document->getTemporaryPriority(); } if (!is_null($document->getPageRank())) { $valueArray['pageRank'] = $document->getPageRank(); } if (!is_null($document->getSolrCoreHints())) { $valueArray['solrCoreHints'] = $document->getSolrCoreHints(); } return $valueArray; }