[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 排序错误,请问如何解决
1
wico77 OP ES 里有个 ignore_unmapped 选项,不知道 pyes 里怎么设置 ignore_unmapped
|
2
vietor 2016-02-01 07:05:12 +08:00 via Android
加一个检查 random_key de filter
|