我有一个 Campaign 模型,这就是我的自定义映射的样子:
searchkick mappings: {
campaign: {
properties: {
title: {type: "string", analyzer: "snowball"},
deal_title: {type: "string", analyzer: "snowball"},
description: {type: "string", analyzer: "snowball"}
}
}
}
Run Code Online (Sandbox Code Playgroud)
当我重新索引竞选文件时
c = Campaign.search "this is"
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
Searchkick::InvalidQueryError: [400] {
"error":{
"root_cause":[
{
"type":"query_parsing_exception",
"reason":"[match] analyzer [searchkick_search] not found",
"index":"campaigns_development_20160205130806185",
"line":1,
"col":96
}
],
"type":"search_phase_execution_exception",
"reason":"all shards failed",
"phase":"query",
"grouped":true,
"failed_shards":[
{
"shard":0,
"index":"campaigns_development_20160205130806185",
"node":"kiTXKzIEQjuI9UNDzXZ1DA",
"reason":{
"type":"query_parsing_exception",
"reason":"[match] analyzer [searchkick_search] not found",
"index":"campaigns_development_20160205130806185",
"line":1,
"col":96
}
}
]
},
"status":400
}
Run Code Online (Sandbox Code Playgroud)
此外,当我将 …