コード例 #1
0
 private function updateMappingWithNewDateMetadata(Docman_Item $item)
 {
     $mapping_data = $this->request_data_factory->getPUTDateMappingMetadata($item, $this->client->getMapping($item->getGroupId()));
     if (!$this->mappingNeedsToBoUpdated($item, $mapping_data)) {
         return;
     }
     $this->logger->debug('update mapping of project #' . $item->getGroupId() . ' with new custom date metadata');
     $this->client->setMapping($item->getGroupId(), $mapping_data);
 }
コード例 #2
0
 private function deleteForProject($project_id)
 {
     $this->logger->debug('[Wiki] ElasticSearch: deleting all project wiki pages #' . $project_id);
     try {
         $this->client->getIndexedType($project_id);
         $this->client->deleteType($project_id);
     } catch (ElasticSearch_TypeNotIndexed $exception) {
         $this->logger->debug('[Wiki] ElasticSearch: project #' . $project_id . ' not indexed, nothing to delete');
         return;
     }
 }
コード例 #3
0
 public function deleteTrackerIndex($tracker_id)
 {
     $this->client->deleteType($tracker_id);
 }
コード例 #4
0
 /**
  * Remove an indexed document
  *
  * @param array $params
  */
 public function delete($params)
 {
     $this->client->delete($params['item']->getId());
 }
コード例 #5
0
 /**
  * Remove an indexed document
  *
  * @param Docman_Item $item The item to delete
  */
 public function delete(Docman_Item $item)
 {
     $this->client->delete($item->getId());
 }