1
私はマッピングにストップワードのリストを追加しようとしていますが、エラーが発生します。これはマッピングです:elasticsearchを使用してアナライザにストップワードリストを定義します。
PUT test-recipe
{
"mappings": {
"recipe" : {
"properties" : {
"ingredients" : {
"type" : "string",
"analyzer": "english",
"stopwords": ["my", "stop", "words"]
}
}
}
}
}
このマッピングは、ストップワードパラメータなしで正常に動作します。しかし、ストップワードフィールドでは、次のエラーが表示されます。
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Mapping definition for [ingredients] has unsupported parameters: [stopwords : [Best®, Halves, organic, island, free, gluten, high-gluten, segments, baking, cooking, new, active, dry, leaves, slices, sliced, warm, root, hot, jack, extract, slivered, sliver, non-fat, fat, chopped, skinless, seed, nonfat, melted, cracked, in, split, vegetable, smoked, medium, nectar, all-purpose, fraîche, fresh]]"
}
],
"type": "mapper_parsing_exception",
"reason": "Failed to parse mapping [recipe]: Mapping definition for [ingredients] has unsupported parameters: [stopwords : [Best®, Halves, organic, island, free, gluten, high-gluten, segments, baking, cooking, new, active, dry, leaves, slices, sliced, warm, root, hot, jack, extract, slivered, sliver, non-fat, fat, chopped, skinless, seed, nonfat, melted, cracked, in, split, vegetable, smoked, medium, nectar, all-purpose, fraîche, fresh]]",
"caused_by": {
"type": "mapper_parsing_exception",
"reason": "Mapping definition for [ingredients] has unsupported parameters: [stopwords : [Best®, Halves, organic, island, free, gluten, high-gluten, segments, baking, cooking, new, active, dry, leaves, slices, sliced, warm, root, hot, jack, extract, slivered, sliver, non-fat, fat, chopped, skinless, seed, nonfat, melted, cracked, in, split, vegetable, smoked, medium, nectar, all-purpose, fraîche, fresh]]"
}
},
"status": 400
}
なぜこの問題が発生したのか分かりましたら、私はその日を迎えます。さらに、私の「このようなクエリのように」をやっているときにストップワードリストが考慮に入れられるでしょうか?
をそれを使用する必要があります:カスタムAnalyzerは、[cooking_nonstop]の名前でフィルタを見つけることができませんでした[english_morphology] – mel
あなたは右、単に "cooking_nonstop"アナライザーから削除するか、[ここ](https://github.com/imotov/elasticsearch-analysis-morphology)からインストールしてください。私はコピー/貼り付けの問題です=) – pkhlop