栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

springboot操作es 查询异常“reason“: “No mapping found for [id] in order to sort on“,

springboot操作es 查询异常“reason“: “No mapping found for [id] in order to sort on“,

{
    "error": {
        "root_cause": [
            {
                "type": "query_shard_exception",
                "reason": "No mapping found for [id] in order to sort on",
                "index_uuid": "KrxKsV5bSam3zz6oz-_6-w",
                "index": "content"
            }
        ],
        "type": "search_phase_execution_exception",
        "reason": "all shards failed",
        "phase": "query",
        "grouped": true,
        "failed_shards": [
            {
                "shard": 0,
                "index": "content",
                "node": "0aVzWwFeRSyM26qXRZXofA",
                "reason": {
                    "type": "query_shard_exception",
                    "reason": "No mapping found for [id] in order to sort on",
                    "index_uuid": "KrxKsV5bSam3zz6oz-_6-w",
                    "index": "content"
                }
            }
        ]
    },
    "status": 400
}

错误:                "reason": "No mapping found for [id] in order to sort on",、

大概意思 :查询时候遇到id 这个作为排序字段,但是es 不存在的

解决方案:后端不设置排序字段 或者 通过head 查询一下数据 看一下 要正确排序字段

 

 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/354640.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号