Ejemplo n.º 1
0
 /**
  * @param Searchable $type
  * @return array
  */
 protected function data(Searchable $type)
 {
     $params = ['index' => $this->config->getIndex(), 'type' => $type->getSearchableType(), 'id' => $type->getSearchableId(), 'body' => $type->getSearchableDocument()];
     if ($routing = $type->useSearchableRouting()) {
         $params['routing'] = $type->getSearchableRouting();
     }
     return $params;
 }