elasticsearch ElasticSearch排序异常-可能与嵌套相关,elasticsearch,nest,elasticsearch,Nest" /> elasticsearch ElasticSearch排序异常-可能与嵌套相关,elasticsearch,nest,elasticsearch,Nest" />

elasticsearch ElasticSearch排序异常-可能与嵌套相关

elasticsearch ElasticSearch排序异常-可能与嵌套相关,elasticsearch,nest,elasticsearch,Nest,我们最近从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][

我们最近从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
}
我正在使用.NETC#应用程序中最新版本的NEST创建索引并查询它

我还没有尝试在登台环境中重新创建索引,因为我不想破坏它,直到我知道如何修复它:)

有人有什么想法吗


谢谢

我最近切换到了ES 0.90.7和最新的Nest。现在世界上一切都很好。

经过大量挖掘,我认为这是一个已经解决的已知问题:
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
        }
    }
}