{"aggs": {
"gwAppName": {
"terms": {
"field": "field",
"script": {
"source": "doc['field1'].empty?doc['field'].value:doc['field1'].value",
"lang": "painless"
}
}
}
}
{
"error": {
"root_cause": [
{
"type": "script_exception",
"reason": "runtime error",
"script_stack": [
"java.nio.Buffer.checkIndex(Buffer.java:540)",
"java.nio.DirectByteBuffer.get(DirectByteBuffer.java:253)",
"org.apache.lucene.store.ByteBufferGuard.getByte(ByteBufferGuard.java:118)",
"org.apache.lucene.store.ByteBufferIndexInput$SingleBufferImpl.readByte(ByteBufferIndexInput.java:385)",
"org.apache.lucene.util.packed.DirectReader$DirectPackedReader2.get(DirectReader.java:106)",
"org.apache.lucene.codecs.lucene70.Lucene70DocValuesProducer$19.ordValue(Lucene70DocValuesProducer.java:865)",
"org.apache.lucene.index.SingletonSortedSetDocValues.advanceExact(SingletonSortedSetDocValues.java:83)",
"org.elasticsearch.index.fielddata.FieldData$10.advanceExact(FieldData.java:345)",
"org.elasticsearch.index.fielddata.ScriptDocValues$BinaryScriptDocValues.setNextDocId(ScriptDocValues.java:685)",
"org.elasticsearch.index.fielddata.ScriptDocValues$Strings.setNextDocId(ScriptDocValues.java:720)",
"org.elasticsearch.search.lookup.LeafDocLookup.get(LeafDocLookup.java:94)",
"org.elasticsearch.search.lookup.LeafDocLookup.get(LeafDocLookup.java:39)",
"doc['field1'].empty?doc['field'].value:doc['field1'].value",
" ^---- HERE"
],
"script": "doc['field1'].empty?doc['field'].value:doc['field1'].value",
"lang": "painless"
}
],
"type": "search_phase_execution_exception",
"reason": "all shards failed",
"phase": "query",
"grouped": true,
"failed_shards": [
{
"shard": 0,
"index": "log-lemon-agw-access-hexi-20220924",
"node": "m6KEOrUgTMqRKvNpf1eEWw",
"reason": {
"type": "script_exception",
"reason": "runtime error",
"script_stack": [
"java.nio.Buffer.checkIndex(Buffer.java:540)",
"java.nio.DirectByteBuffer.get(DirectByteBuffer.java:253)",
"org.apache.lucene.store.ByteBufferGuard.getByte(ByteBufferGuard.java:118)",
"org.apache.lucene.store.ByteBufferIndexInput$SingleBufferImpl.readByte(ByteBufferIndexInput.java:385)",
"org.apache.lucene.util.packed.DirectReader$DirectPackedReader2.get(DirectReader.java:106)",
"org.apache.lucene.codecs.lucene70.Lucene70DocValuesProducer$19.ordValue(Lucene70DocValuesProducer.java:865)",
"org.apache.lucene.index.SingletonSortedSetDocValues.advanceExact(SingletonSortedSetDocValues.java:83)",
"org.elasticsearch.index.fielddata.FieldData$10.advanceExact(FieldData.java:345)",
"org.elasticsearch.index.fielddata.ScriptDocValues$BinaryScriptDocValues.setNextDocId(ScriptDocValues.java:685)",
"org.elasticsearch.index.fielddata.ScriptDocValues$Strings.setNextDocId(ScriptDocValues.java:720)",
"org.elasticsearch.search.lookup.LeafDocLookup.get(LeafDocLookup.java:94)",
"org.elasticsearch.search.lookup.LeafDocLookup.get(LeafDocLookup.java:39)",
"doc['field1'].empty?doc['field'].value:doc['field1'].value",
" ^---- HERE"
],
"script": "doc['field1'].empty?doc['field'].value:doc['field1'].value",
"lang": "painless",
"caused_by": {
"type": "index_out_of_bounds_exception",
"reason": null
}
}
}
]
},
"status": 500
}
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.