Smile\ElasticsuiteCore\Index\Bulk\BulkRequest::addDocument PHP Метод

addDocument() публичный Метод

public addDocument ( Smile\ElasticsuiteCore\Api\Index\IndexInterface $index, Smile\ElasticsuiteCore\Api\Index\TypeInterface $type, $docId, array $data )
$index Smile\ElasticsuiteCore\Api\Index\IndexInterface
$type Smile\ElasticsuiteCore\Api\Index\TypeInterface
$data array
    public function addDocument(IndexInterface $index, TypeInterface $type, $docId, array $data)
    {
        $this->bulkData[] = ['index' => ['_index' => $index->getName(), '_type' => $type->getName(), '_id' => $docId]];
        $this->bulkData[] = $data;
        return $this;
    }