【发布时间】:2021-08-16 19:15:51
【问题描述】:
我已经安装了 tamayo/laravel-scout-elastic laravel 包,并且我确实导入了我的产品表记录,但是每当我搜索任何内容时,我都会收到“未找到索引异常”。下面是我对 scout.php 文件的配置
`'elasticsearch' => [
'index' => env('ELASTICSEARCH_INDEX', 'marketplace'),
'hosts' => [
env('ELASTICSEARCH_HOST', 'http://localhost:9200'),
],
],`
当我做curl 'localhost:9200/marketplace/_mapping?pretty'时,我得到了以下回复。
`{
"error" : {
"root_cause" : [ {
"type" : "index_not_found_exception",
"reason" : "no such index",
"resource.type" : "index_or_alias",
"resource.id" : "marketplace",
"index" : "marketplace"
} ],
"type" : "index_not_found_exception",
"reason" : "no such index",
"resource.type" : "index_or_alias",
"resource.id" : "marketplace",
"index" : "marketplace"
},
"status" : 404
}`
我错过了什么吗?任何帮助将不胜感激。
【问题讨论】:
标签: php laravel elasticsearch laravel-scout