public function indexCopiedItem(Docman_Item $item)
 {
     $this->logger->debug('index new copied item #' . $item->getId() . ' and its children');
     $item_factory = $this->getDocmanItemFactory($item);
     $items = array_merge(array($item), $item_factory->getAllChildrenFromParent($item));
     foreach ($items as $item_to_index) {
         $this->logger->debug('index item #' . $item_to_index->getId());
         $indexed_data = $this->getIndexedData($item_to_index) + $this->getContent($item_to_index);
         $this->client->index($item_to_index->getGroupId(), $item_to_index->getId(), $indexed_data);
     }
 }
 /**
  * Index an artifact
  *
  * @param Tracker_Artifact $artifact The artifact to index
  */
 public function indexArtifactUpdate(Tracker_Artifact $artifact)
 {
     $this->initializeMapping($artifact->getTracker());
     $this->logger->debug('[Tracker] Elasticsearch index artifact #' . $artifact->getId() . ' in tracker #' . $artifact->getTrackerId());
     $this->client->index($artifact->getTrackerId(), $artifact->getId(), $this->tracker_data_factory->getFormattedArtifact($artifact));
 }
Ejemplo n.º 3
0
 /**
  * Index a new document with permissions
  *
  * @param Docman_Item    $item    The docman item
  * @param Docman_Version $version The version to index
  */
 public function indexNewDocument(Docman_Item $item, Docman_Version $version)
 {
     $indexed_data = $this->getIndexedData($item, $version);
     $this->client->index($indexed_data, $item->getId());
 }
Ejemplo n.º 4
0
 /**
  * Index a new document with permissions
  *
  * @param array $params parameters of the docman event
  */
 public function indexNewDocument($params)
 {
     $indexed_data = $this->getIndexedData($params['item'], $params['version']);
     $this->client->index($indexed_data, $params['item']->getId());
 }
 /**
  * Index a new wiki page
  *
  * @param WikiPage $wiki_page The wiki page
  */
 public function indexWikiPage(WikiPage $wiki_page)
 {
     $this->logger->debug('[Wiki] ElasticSearch: index wiki page ' . $wiki_page->getPagename() . ' #' . $wiki_page->getId());
     $indexed_data = $this->request_data_factory->getIndexedWikiPageData($wiki_page);
     $this->client->index($wiki_page->getGid(), $wiki_page->getId(), $indexed_data);
 }