最近、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# アプリの最新バージョンの NEST を使用して、インデックスを作成し、クエリを実行しています。
修正方法がわかるまでそれを壊したくないので、ステージング環境でインデックスを再作成しようとはまだ試みていません:)
誰でもアイデアはありますか?
ありがとう