Index 128 out of bounds for length 128

Hi All ,getting error like this..."caused_by" : {
"type" : "array_index_out_of_bounds_exception",
"reason" : "Index 128 out of bounds for length 128",
"caused_by" : {
"type" : "array_index_out_of_bounds_exception",
"reason" : "Index 128 out of bounds for length 128"
}

while doing aggregation on nested Fields and its giving only for one particular document but data stored in that doc seems good as other have ....

here is the StackTrace of error:Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 128 out of bounds for length 128
at org.apache.lucene.codecs.lucene84.Lucene84PostingsReader$BlockDocsEnum.freq(Lucene84PostingsReader.java:363) ~[lucene-core-8.4.0.jar:8.4.0 bc02ab906445fcf4e297f4ef00ab4a54fdd72ca2 - jpountz - 2019-12-19 20:16:14]
at org.apache.lucene.search.TermScorer.score(TermScorer.java:75) ~[lucene-core-8.4.0.jar:8.4.0 bc02ab906445fcf4e297f4ef00ab4a54fdd72ca2 - jpountz - 2019-12-19 20:16:14]
at org.apache.lucene.search.TopScoreDocCollector$SimpleTopScoreDocCollector$1.collect(TopScoreDocCollector.java:76) ~[lucene-core-8.4.0.jar:8.4.0 bc02ab906445fcf4e297f4ef00ab4a54fdd72ca2 - jpountz - 2019-12-19 20:16:14]
at org.Elasticsearch.search.aggregations.metrics.TopHitsAggregator$1.collect(TopHitsAggregator.java:156) ~[Elasticsearch-7.6.2.jar:7.6.2]
at org.Elasticsearch.search.aggregations.bucket.composite.CompositeAggregator$3.collect(CompositeAggregator.java:405) ~[Elasticsearch-7.6.2.jar:7.6.2]

And it is working fine without TopHits aggregation but whenever applied top hits aggregation its breaking and giving error like this..

here is the quey :

#query for currupt doc----field == PRICE_CTRL ...
GET /hotfix-qa.masterdataonline.com_1005_do_0_en_local2/_search
{
"size": 0,
"query": {
"bool": {
"must": [
{
"match": {
"id": "264682"
}
}
]
}
},
"aggregations": {
"nested_tags": {
"nested": {
"path": "hyvs.4.rows"
},
"aggregations": {
"bucket": {
"composite": {
"size": 1000,
"sources": [
{
"FILTER": {
"terms": {
"field": "hyvs.4.rows.PRICE_CTRL.vc.c.keyword",
"missing_bucket": false,
"order": "desc"
}
}
}
]
},
"aggregations": {
"items": {
"top_hits": {
"from": 0,
"size": 100,
"version": false,
"seq_no_primary_term": false,
"explain": true,
"_source": {
"includes": [
"hyvs.4.rows.PRICE_CTRL.vc"
],
"excludes":
}
}
}
}
}
}
}
}
}

and structure of document....:

Screenshot from 2021-10-29 11-11-17

If anyone has faced this kind of issue please post the answer ASAP

aprt from this ,the root error was like that......

Can someone please answer this?

@dadoonet
@Mark_Harwood

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.