我们最近从ES 0.23升级到0.90,现在我的查询,例如:
{
"sort": {
"companyname.sort": {
"order": "asc"
}
}
}
引起异常:
{
error: SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[Y8U7j2f-QvS75-6SfxlGuA][boss][0]:
QueryPhaseExecutionException[[boss][0]:
query[ConstantScore(cache(_type:SalesCompany))],from[0],size[10],sort[<custom:"companyname.sort":
org.elasticsearch.index.fielddata.fieldcomparator.BytesRefFieldComparatorSource@292f8639>]:
Query Failed [Failed to execute main query]]; nested: NullPointerException; }{[Y8U7j2f-QvS75-6SfxlGuA][boss][1]: QueryPhaseExecutionException[[boss][1]:
query[ConstantScore(cache(_type:SalesCompany))],from[0],size[10],sort[<custom:"companyname.sort":
org.elasticsearch.index.fielddata.fieldcomparator.BytesRefFieldComparatorSource@292f8639>]: Query Failed [Failed to execute main query]]; nested: NullPointerException; }]
status: 500
}
如果我在我们的暂存环境中使用0.23创建的索引运行相同的查询 - 但安装了ES 0.90 - 它工作正常。映射是:
companyname: {
type: multi_field
fields: {
companyname: {
type: string
store: true
analyzer: simple
}
sort: {
type: string
index: not_analyzed
store: true
omit_norms: true
index_options: docs
analyzer: simple
include_in_all: false
}
}
}
我正在使用.Net C#app的最新版NEST来创建索引并进行查询。
我还没有尝试在暂存环境中重新创建索引,因为我不想破解它,直到我知道如何解决它:)
有人有任何想法吗?
由于
答案 0 :(得分:0)
我最近切换到ES 0.90.7和最新的Nest。现在一切都在世界各地。