V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
wico77
V2EX  ›  问与答

elasticsearch 错误

  •  
  •   wico77 · 2016-02-01 00:48:54 +08:00 · 1629 次点击
    这是一个创建于 3022 天前的主题,其中的信息可能已经有所发展或是发生改变。

    [2016-01-30 23:58:36,565][DEBUG][action.search.type ] [Razorback] [.marvel-2016.01.22][0], node[7B-RkEI5Rq2uLL2yqg3CPA], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@2c72a34] lastShard [true]
    org.elasticsearch.search.SearchParseException: [.marvel-2016.01.22][0]: query[ConstantScore(:)],from[20],size[10]: Parse Failure [Failed to parse source [{"from":20,"size":10,"sort":[{"random_key":{"order":"desc"}}]}]]
    at org.elasticsearch.search.SearchService.parseSource(SearchService.java:721)
    at org.elasticsearch.search.SearchService.createContext(SearchService.java:558)
    at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:529)
    at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:291)
    at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:231)
    at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:228)
    at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:559)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: org.elasticsearch.search.SearchParseException: [.marvel-2016.01.22][0]: query[ConstantScore(:)],from[20],size[10]: Parse Failure [No mapping found for [random_key] in order to sort on]
    mongodb 数据库里的有些格式貌似没有 random_key 字段,然后 ES 排序错误,请问如何解决

    2 条回复    2016-02-01 07:05:12 +08:00
    wico77
        1
    wico77  
    OP
       2016-02-01 00:59:09 +08:00
    ES 里有个 ignore_unmapped 选项,不知道 pyes 里怎么设置 ignore_unmapped
    vietor
        2
    vietor  
       2016-02-01 07:05:12 +08:00 via Android
    加一个检查 random_key de filter
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1766 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 16:47 · PVG 00:47 · LAX 09:47 · JFK 12:47
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.