Exemplo n.º 1
0
 public function indexContent($doc_content)
 {
     $es = self::esConnect();
     \File::put($this->get_file_path('markdown'), $doc_content->content);
     \File::put($this->get_file_path('html'), Markdown::render($doc_content->content));
     $body = array('id' => $this->id, 'content' => $doc_content->content);
     $params = array('index' => $this->index, 'type' => self::TYPE, 'id' => $this->id, 'body' => $body);
     $results = $es->index($params);
 }