laravel-scout-elastic icon indicating copy to clipboard operation
laravel-scout-elastic copied to clipboard

after 7.0 ,only 'index', delete 'Type'

Open Jackfinal opened this issue 2 years ago • 0 comments

after 7.0 ,only 'index', delete 'Type'

ScoutEngines\Elasticsearch\ElasticsearchEngine.php

Cancellation Code: '_type' => $model->searchableAs()

`public function update($models) { $params['body'] = [];

    $models->each(function($model) use (&$params)
    {
        $params['body'][] = [
            'update' => [
                '_id' => $model->getKey(),
                '_index' => $this->index,
                // '_type' => $model->searchableAs(),
            ]
        ];
        $params['body'][] = [
            'doc' => $model->toSearchableArray(),
            'doc_as_upsert' => true
        ];
    });

    $this->elastic->bulk($params);
}`

Jackfinal avatar Jan 15 '23 12:01 Jackfinal