使用 ElasticSearch 和 Laravel Scout 在多个模型中搜索
| Elasticsearch 版本 | Elasticsearch DSL 版本 |
|---|---|
| >= 8.0 | >= 8.0.0 |
| >= 7.0 | >= 3.0.0 |
| >= 6.0, [ |
// 其他服务提供者Here is an example of `MyImportSourceFactory`php 命名空间 Matchish\ScoutElasticSearch\Searchable; final 类 MyImportSourceFactory 实现了 ImportSourceFactory { public static function from(string $className): ImportSource { // 添加所有所需的作用域 return new DefaultImportSource($className, [new WithCommentsScope()]); } } class WithCommentsScope 实现了 Scope 接口 { /**
您还可以通过利用索引数据自定义保存模型时的索引数据。暂无开放 Issues,或尚未同步最近议题。