Closed
Description
Environment
- Laravel 5.8
- ElasticSearch 7.4.2
- ElasticSearch-analysis-ik 7.4.2
- ElasticSearch-PHP 7.4.0
Error detail
First, createIndex、deleteIndex、getMappings、createDoc is OK,$client->indices()->putMapping($params);
is error 'No alive nodes found in your cluster'.
But, i use curl to set mapping is ok. And when i add mappints in createIndex, it's ok too.
I don't know if it's my own problem.
curl -XPOST http://localhost:9200/index/_mapping -H 'Content-Type:application/json' -d'
{
"properties": {
"content": {
"type": "text",
"analyzer": "ik_max_word",
"search_analyzer": "ik_smart"
}
}
}'
Error detail
首先,创建index、删除index、获取mappings、以及对doc的增删改查都没问题,但是当我给已有的index设置mapping的时候报错:No alive nodes found in your cluster
.
我当时怀疑是es的问题,但是在linux上使用curl设置的时候他成功了,同时,我在创建index的时候添加mappings的设置,他也成功了,只有单独设置mapping的时候报错。我不知道这是不是我自己的问题。
Metadata
Metadata
Assignees
Labels
No labels