找不到字段的edgeNGram_analyzer

时间:2017-01-13 19:02:51

标签: elasticsearch

我在一个索引上创建了一个同义词分析器,它适用于elasticsearch 1但不适用于2.4:

这是我的映射:

{
            "product": {
                "_all": {
                    "enabled": true,
                    "auto_boost": true,
                    "index_analyzer": "edgeNGram_analyzer",
                    "search_analyzer": "standard"
                },
                "properties": {
                    "brand": {
                        "type": "string",
                        "include_in_all": true
                    },
                    "brand_ar": {
                        "type": "string",
                        "analyzer": "arabic",
                        "include_in_all": true
                    },
                    "categories": {
                        "properties": {
                            "1": {
                                "type": "string"
                            },
                            "146": {
                                "type": "string"
                            },
                            "147": {
                                "type": "string"
                            },
                            "150": {
                                "type": "string"
                            },
                            "151": {
                                "type": "string"
                            },
                            "152": {
                                "type": "string"
                            },
                            "155": {
                                "type": "string"
                            },
                            "156": {
                                "type": "string"
                            },
                            "157": {
                                "type": "string"
                            },
                            "161": {
                                "type": "string"
                            },
                            "162": {
                                "type": "string"
                            },
                            "334": {
                                "type": "string"
                            },
                            "5": {
                                "type": "string"
                            }
                        }
                    },
                    "category": {
                        "type": "string",
                        "boost": 5.0,
                        "include_in_all": true
                    },
                    "category_ar": {
                        "type": "string",
                        "boost": 5.0,
                        "analyzer": "arabic",
                        "include_in_all": true
                    },
                    "category_id": {
                        "type": "integer",
                        "include_in_all": false
                    },
                    "colors": {
                        "type": "string",
                        "index": "not_analyzed"
                    },
                    "colors_name": {
                        "type": "string",
                        "include_in_all": true
                    },
                    "types": {
                        "type": "string",
                        "include_in_all": true
                    },
                    "types_array": {
                        "type": "string",
                        "index": "not_analyzed"
                    },
                    "colors_name_ar": {
                        "type": "string",
                        "analyzer": "arabic",
                        "include_in_all": true
                    },
                    "created_at": {
                        "type": "date",
                        "format": "dateOptionalTime"
                    },
                    "delivery": {
                        "type": "string"
                    },
                    "delivery_ar": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string",
                        "include_in_all": true
                    },
                    "description_ar": {
                        "type": "string",
                        "analyzer": "arabic",
                        "include_in_all": true
                    },
                    "id": {
                        "type": "string",
                        "index": "no",
                        "include_in_all": false
                    },
                    "image_link": {
                        "type": "string",
                        "index": "not_analyzed"
                    },
                    "images": {
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            },
                            "path": {
                                "type": "string"
                            }
                        }
                    },
                    "is_best_seller": {
                        "type": "integer",
                        "include_in_all": false
                    },
                    "is_deal": {
                        "type": "integer",
                        "include_in_all": false
                    },
                    "keywords": {
                        "type": "string",
                        "include_in_all": true
                    },
                    "made_id": {
                        "type": "string"
                    },
                    "made_in": {
                        "type": "string",
                        "include_in_all": true
                    },
                    "made_in_ar": {
                        "type": "string",
                        "analyzer": "arabic",
                        "include_in_all": true
                    },
                    "name": {
                        "type": "string",
                        "boost": 10.0,
                        "index_analyzer": "edgeNGram_analyzer",
                        "include_in_all": true
                    },
                    "name_ar": {
                        "type": "string",
                        "boost": 10.0,
                        "analyzer": "arabic",
                        "include_in_all": true
                    },
                    "price": {
                        "type": "double",
                        "include_in_all": false
                    },
                    "price_before_discount": {
                        "type": "double",
                        "include_in_all": false
                    },
                    "quality": {
                        "type": "string",
                        "index": "not_analyzed"
                    },
                    "quality_ar": {
                        "type": "string",
                        "analyzer": "arabic"
                    },
                    "rating": {
                        "type": "integer",
                        "include_in_all": false
                    },
                    "status": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "date",
                        "format": "dateOptionalTime"
                    },
                    "uuid": {
                        "type": "string",
                        "index": "no",
                        "include_in_all": false
                    },
                    "vendor_id": {
                        "type": "string"
                    },
                    "vendor_location": {
                        "type": "geo_point"
                    },
                    "vendor_name": {
                        "type": "string",
                        "include_in_all": false
                    },
                    "views": {
                        "type": "integer",
                        "include_in_all": false
                    },
                    "warranty": {
                        "type": "string"
                    },
                    "warranty_ar": {
                        "type": "string"
                    }
                }
            }
}

但是当我尝试使用映射时遇到了这个问题:

{
"error": "MapperParsingException[Analyzer [edgeNGram_analyzer] not found for field [name]]",
"status": 400
}

任何想法,我可能会遗漏一些东西,但我无法思考。我使用的是elasticsearch 2.4

0 个答案:

没有答案