【发布时间】:2019-09-15 09:33:03
【问题描述】:
我正在使用https://github.com/babenkoivan/scout-elasticsearch-driver 来使用 Laravel Scout 实现 Elasticsearch。 Ivan 在 Github 上提到了这一点:
在 Elasticsearch 6.0.0 或更高版本中创建的索引只能包含一个映射类型。在 5.x 中创建的具有多种映射类型的索引将继续像以前一样在 Elasticsearch 6.x 中发挥作用。映射类型将在 Elasticsearch 7.0.0 中完全删除。
如果我在这里理解:https://www.elastic.co/guide/en/elasticsearch/reference/master/removal-of-types.html 我要么需要使用:
1) PUT 索引?include_type_name=true
或者,更好
2) 放置索引/_doc/1 { “富”:“巴兹” }
我被困住了,因为我不知道如何使用 1) 或 2)
如何添加参数 include_type_name=true?
如何在不使用 include_type_name 参数的情况下创建正确的映射?
class TestIndexConfigurator extends IndexConfigurator
{
use Migratable;
/**
* @var array
*/
protected $settings = [
];
protected $name = 'test';
}
【问题讨论】:
-
你想用这个插件实现什么我的意思是你想用他的名字搜索
User吗? -
你找到解决办法了吗?
-
试试github.com/matchish/laravel-scout-elasticsearch比
babenkoivan/scout-elasticsearch-driver好用
标签: laravel elasticsearch