V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
wico77
V2EX  ›  问与答

elasticsearch 错误

  •  
  •   wico77 · Feb 1, 2016 · 1965 views
    This topic created in 3744 days ago, the information mentioned may be changed or developed.

    [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 replies    2016-02-01 07:05:12 +08:00
    wico77
        1
    wico77  
    OP
       Feb 1, 2016
    ES 里有个 ignore_unmapped 选项,不知道 pyes 里怎么设置 ignore_unmapped
    vietor
        2
    vietor  
       Feb 1, 2016 via Android
    加一个检查 random_key de filter
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2284 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 15:55 · PVG 23:55 · LAX 08:55 · JFK 11:55
    ♥ Do have faith in what you're doing.