Hello,World

根据poi排序抛异常

Elasticsearch | 作者 fcz | 发布于2015年04月02日 | 阅读数:8568

异常信息如下:
org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to execute phase [dfs], all shards failed; shardFailures {[5h0eq2TSRHi1m4Vb9JN4Nw][business_data_test][0]: SearchParseException[[business_data_test][0]: query[+(name:? name:? name:?) +city:"? ?"],from[0],size[20]: Parse Failure [Failed to parse source [{"from":0,"size":20,"query":{"bool":{"must":[{"match":{"name":{"query":"???","type":"boolean"}}},{"match":{"city":{"query":"??","type":"phrase"}}}]}},"sort":[{"_geo_distance":{"poi":[115.694677201223,39.5896719587423],"unit":"km","distance_type":"sloppy_arc","reverse":true,"mode":"min"}}]}]]]; nested: ClassCastException[org.elasticsearch.index.fielddata.plain.PagedBytesIndexFieldData cannot be cast to org.elasticsearch.index.fielddata.IndexGeoPointFieldData]; }{[5h0eq2TSRHi1m4Vb9JN4Nw][business_data_test][1]: SearchParseException[[business_data_test][1]: query[+(name:? name:? name:?) +city:"? ?"],from[0],size[20]: Parse Failure [Failed to parse source [{"from":0,"size":20,"query":{"bool":{"must":[{"match":{"name":{"query":"???","type":"boolean"}}},{"match":{"city":{"query":"??","type":"phrase"}}}]}},"sort":[{"_geo_distance":{"poi":[115.694677201223,39.5896719587423],"unit":"km","distance_type":"sloppy_arc","reverse":true,"mode":"min"}}]}]]]; nested: ClassCastException[org.elasticsearch.index.fielddata.plain.PagedBytesIndexFieldData cannot be cast to org.elasticsearch.index.fielddata.IndexGeoPointFieldData]; }{[5h0eq2TSRHi1m4Vb9JN4Nw][business_data_test][2]: SearchParseException[[business_data_test][2]: query[+(name:? name:? name:?) +city:"? ?"],from[0],size[20]: Parse Failure [Failed to parse source [{"from":0,"size":20,"query":{"bool":{"must":[{"match":{"name":{"query":"???","type":"boolean"}}},{"match":{"city":{"query":"??","type":"phrase"}}}]}},"sort":[{"_geo_distance":{"poi":[115.694677201223,39.5896719587423],"unit":"km","distance_type":"sloppy_arc","reverse":true,"mode":"min"}}]}]]]; nested: ClassCastException[org.elasticsearch.index.fielddata.plain.PagedBytesIndexFieldData cannot be cast to org.elasticsearch.index.fielddata.IndexGeoPointFieldData]; }{[5h0eq2TSRHi1m4Vb9JN4Nw][business_data_test][3]: SearchParseException[[business_data_test][3]: query[+(name:? name:? name:?) +city:"? ?"],from[0],size[20]: Parse Failure [Failed to parse source [{"from":0,"size":20,"query":{"bool":{"must":[{"match":{"name":{"query":"???","type":"boolean"}}},{"match":{"city":{"query":"??","type":"phrase"}}}]}},"sort":[{"_geo_distance":{"poi":[115.694677201223,39.5896719587423],"unit":"km","distance_type":"sloppy_arc","reverse":true,"mode":"min"}}]}]]]; nested: ClassCastException[org.elasticsearch.index.fielddata.plain.PagedBytesIndexFieldData cannot be cast to org.elasticsearch.index.fielddata.IndexGeoPointFieldData]; }{[5h0eq2TSRHi1m4Vb9JN4Nw][business_data_test][4]: SearchParseException[[business_data_test][4]: query[+(name:? name:? name:?) +city:"? ?"],from[0],size[20]: Parse Failure [Failed to parse source [{"from":0,"size":20,"query":{"bool":{"must":[{"match":{"name":{"query":"???","type":"boolean"}}},{"match":{"city":{"query":"??","type":"phrase"}}}]}},"sort":[{"_geo_distance":{"poi":[115.694677201223,39.5896719587423],"unit":"km","distance_type":"sloppy_arc","reverse":true,"mode":"min"}}]}]]]; nested: ClassCastException[org.elasticsearch.index.fielddata.plain.PagedBytesIndexFieldData cannot be cast to org.elasticsearch.index.fielddata.IndexGeoPointFieldData]; }
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:233)
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$1.onFailure(TransportSearchTypeAction.java:179)
at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:565)
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)
大神们帮忙给看一下吧,感谢。
已邀请:

fcz - 80后IT?

赞同来自:

没人回复啊?是因为问题没描述清楚吗? 还是没用过呢? 有漂过的吗?

stab - freshman

赞同来自:

类型转换出错吧,你检查一下你的mapping

要回复问题请先登录注册