首页 > elasticsearch搜索错误,不知是什么原因?

elasticsearch搜索错误,不知是什么原因?

错误提示:

"class_cast_exception: org.elasticsearch.index.fielddata.plain.PagedBytesIndexFieldData cannot be cast to org.elasticsearch.index.fielddata.IndexNumericFieldData"

出现原因: 搜索的时候

ES版本:2.3

索引定义:

{
    "uskenko.com": {
        "mappings": {
            "cc_products": {
                "properties": {
                    "admin_id": {
                        "type": "string"
                    },
                    "amount": {
                        "type": "string"
                    },
                    "code": {
                        "type": "string"
                    },
                    "code_content": {
                        "type": "string"
                    },
                    "content": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "feature_image": {
                        "properties": {
                            "content_type": {
                                "type": "string"
                            },
                            "created_at": {
                                "type": "string"
                            },
                            "disk_name": {
                                "type": "string"
                            },
                            "extension": {
                                "type": "string"
                            },
                            "field": {
                                "type": "string"
                            },
                            "file_name": {
                                "type": "string"
                            },
                            "file_size": {
                                "type": "string"
                            },
                            "id": {
                                "type": "string"
                            },
                            "path": {
                                "type": "string"
                            },
                            "sort_order": {
                                "type": "string"
                            },
                            "updated_at": {
                                "type": "string"
                            }
                        }
                    },
                    "features": {
                        "properties": {
                            "feature": {
                                "properties": {
                                    "description": {
                                        "type": "string"
                                    },
                                    "group_id": {
                                        "type": "string"
                                    },
                                    "id": {
                                        "type": "string"
                                    },
                                    "name": {
                                        "type": "string"
                                    },
                                    "options": {
                                        "type": "string"
                                    },
                                    "sort": {
                                        "type": "string"
                                    },
                                    "type": {
                                        "type": "string"
                                    }
                                }
                            },
                            "feature_id": {
                                "type": "string"
                            },
                            "feature_value": {
                                "properties": {
                                    "code": {
                                        "type": "string"
                                    },
                                    "feature_id": {
                                        "type": "string"
                                    },
                                    "id": {
                                        "type": "string"
                                    },
                                    "name": {
                                        "type": "string"
                                    },
                                    "name2": {
                                        "type": "string"
                                    },
                                    "options": {
                                        "type": "string"
                                    },
                                    "sort": {
                                        "type": "string"
                                    }
                                }
                            },
                            "feature_value_id": {
                                "type": "string"
                            },
                            "id": {
                                "type": "string"
                            },
                            "product_id": {
                                "type": "string"
                            }
                        }
                    },
                    "id": {
                        "type": "string"
                    },
                    "is_gmp": {
                        "type": "string"
                    },
                    "is_pbp": {
                        "type": "string"
                    },
                    "list_price": {
                        "type": "long"
                    },
                    "max_qty": {
                        "type": "string"
                    },
                    "meta_description": {
                        "type": "string"
                    },
                    "meta_keywords": {
                        "type": "string"
                    },
                    "min_qty": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "name2": {
                        "type": "string"
                    },
                    "page_title": {
                        "type": "string"
                    },
                    "popular": {
                        "type": "string"
                    },
                    "price": {
                        "type": "long"
                    },
                    "product_source": {
                        "type": "string"
                    },
                    "rating": {
                        "type": "string"
                    },
                    "remark": {
                        "type": "string"
                    },
                    "saled": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "sort": {
                        "type": "string"
                    },
                    "src_key": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "thumb": {
                        "properties": {
                            "content_type": {
                                "type": "string"
                            },
                            "created_at": {
                                "type": "string"
                            },
                            "disk_name": {
                                "type": "string"
                            },
                            "extension": {
                                "type": "string"
                            },
                            "field": {
                                "type": "string"
                            },
                            "file_name": {
                                "type": "string"
                            },
                            "file_size": {
                                "type": "string"
                            },
                            "id": {
                                "type": "string"
                            },
                            "path": {
                                "type": "string"
                            },
                            "sort_order": {
                                "type": "string"
                            },
                            "updated_at": {
                                "type": "string"
                            }
                        }
                    },
                    "updated_at": {
                        "type": "string"
                    },
                    "weight": {
                        "type": "string"
                    }
                }
            }
        }
    }
}

其中的一条数据:

{
"_index": "uskenko.com",
"_type": "cc_products",
"_id": "41",
"_version": 1,
"_score": 1,
"_source": {
"id": "41",
"admin_id": "4",
"code": "41",
"name": "アイピル(アフターピル)1錠 × 10箱",
"name2": "",
"slug": "i-pill1-10",
"status": "instock",
"list_price": 15000,
"price": 9450,
"amount": "999",
"min_qty": "0",
"max_qty": "0",
"weight": "1",
"saled": "1",
"popular": "8",
"rating": "5",
"sort": "9999",
"is_pbp": "0",
"is_gmp": "0",
"src_key": "",
"page_title": "アイピル通販・10箱|アフターピル購入|効果・副作用・用法詳細",
"meta_keywords": "アイピル・10箱,アフターピル,効果,副作用,用法",
"meta_description": "アイピル(アフターピル)1錠 ・10箱の効果は、望まない妊娠を防ぐ為のみにご利用下さい。アイピルの常用はお止め下さい。 レボノルゲストレルにアレルギー反応のある方は、服用をお止め下さい。 既に妊娠されている方は絶対に服用しないで下さい。既に子宮内で受精卵が着床している方への効果はありません。またアイピルは、あくまで緊急の避妊薬です。中絶用のお薬ではありません。アフターピル通販の効果・副作用・用法詳細について全部メッセージがあります。",
"content": "",
"code_content": "",
"product_source": "{"url":{"1":"","2":"","3":"","4":"","5":""},"price":{"1":"","2":"","3":"","4":"","5":""},"remark":{"1":"","2":"","3":"","4":"","5":""}}",
"remark": "",
"created_at": "2016-06-13 12:46:10",
"updated_at": "2016-06-28 17:29:28",
"feature_image": [
{
"id": "1929",
"disk_name": "575e2c7c1baac819334961.jpg",
"file_name": "アイピル.jpg",
"file_size": "30038",
"content_type": "image/jpeg",
"title": null,
"description": null,
"field": "feature_image",
"sort_order": "1929",
"created_at": "2016-06-13 12:46:04",
"updated_at": "2016-06-13 12:46:10",
"path": "/storage/app/uploads/public/575/e2c/7c1/575e2c7c1baac819334961.jpg",
"extension": "jpg"
}
],
"prices": [ ],
"thumb": [
{
"id": "1930",
"disk_name": "575e2c7f7f9dd539939291.jpg",
"file_name": "アイピル360.jpg",
"file_size": "58450",
"content_type": "image/jpeg",
"title": null,
"description": null,
"field": "thumb",
"sort_order": "1930",
"created_at": "2016-06-13 12:46:07",
"updated_at": "2016-06-13 12:46:10",
"path": "/storage/app/uploads/public/575/e2c/7f7/575e2c7f7f9dd539939291.jpg",
"extension": "jpg"
}
],
"features": [
{
"id": "77",
"product_id": "41",
"feature_id": "24",
"feature_value_id": "97",
"feature": {
"id": "24",
"name": "規格",
"group_id": "0",
"type": "",
"sort": "1",
"description": "",
"options": "0"
},
"feature_value": {
"id": "97",
"feature_id": "24",
"name": "アイピル(アフターピル)1錠×10箱",
"name2": "",
"code": "",
"sort": "1",
"options": "0"
}
}
]
}
}

贴出查询语句看一下

【热门文章】
【热门文章】