Skip to content
This repository has been archived by the owner on Feb 5, 2023. It is now read-only.

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

Open
Jackfinal opened this issue Jan 15, 2023 · 0 comments
Open

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

Jackfinal opened this issue Jan 15, 2023 · 0 comments

Comments

@Jackfinal
Copy link

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);
}`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant