我正在使用https://github.com/basemkhirat/elasticsearch包。
在es.php文件中,我有以下索引
'indices' => [
'media' => [
'settings' => [
'number_of_shards' => 2,
'number_of_replicas' => 2,
'analysis' => [
'filter' => [
'custom_english_stemmer' => [
'type' => "stemmer",
'name' => "english"
],
"english_stop" => [
'type' => "stop",
'stopwords' => "_english_"
]
],
"analyzer" => [
'custom_lowercase_analyzer' => [
// 'type' => 'custom',
'tokenizer' => 'standard',
'filter' => [
'lowercase',
'english_stop',
"custom_english_stemmer"
]
]
]
]
],
'mappings' => [
'properties' => [
'id' => [
'type' => 'long',
'index' => false,
'doc_values' => false,
],
'title' => [
'type' => 'text',
"analyzer" => 'custom_lowercase_analyzer'
]
]
]
]
]
现在何时php artisan es:indices:create
创建执行设置但映射失败并显示错误消息。
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true."
}
],
"type": "illegal_argument_exception",
"reason": "Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true."
},
"status": 400
}
如何解决此问题