# Getting ArrayIndexOutOfBoundsException when doing a simple query

**URL:** <https://discuss.elastic.co/t/getting-arrayindexoutofboundsexception-when-doing-a-simple-query/35175>\
**Category:** Elasticsearch\
**Created:** [November 20, 2015, 5:50pm UTC](https://discuss.elastic.co/t/getting-arrayindexoutofboundsexception-when-doing-a-simple-query/35175 "2015-11-20T17:50:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Melanie\_Zamora](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@Melanie\_Zamora](https://discuss.elastic.co/u/Melanie_Zamora)\
**Post date:** [November 20, 2015, 5:50pm UTC](https://discuss.elastic.co/t/getting-arrayindexoutofboundsexception-when-doing-a-simple-query/35175/1 "2015-11-20T17:50:52Z")

</div>

I am running ES 1.5.2 and keep getting this exception whenever I'm searching for logs in this specific index: atlas20151119; my other indices are fine to search against. Any idea what this exception means?

[2015-11-20 11:32:31,233][DEBUG][action.search.type] [loplhgdl002.atlas.c [m.com](http://m.com)] All shards failed for phase: [query\_fetch]  
org.elasticsearch.search.query.QueryPhaseExecutionException: [atlas20151119][0]: query[filtered(msg:\*)-\>BooleanFilter(+cache(dt:[1447867466834 TO 1447899866834] ) -cache(QueryWrapperFilter((lgr:database))))],from[0],size[500],sort[\<custom:"d t": org.elasticsearch.index.fielddata.fieldcomparator.LongValuesComparatorSource @213b5669\>!]: Query Failed [Failed to execute main query]  
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:163 )  
at org.elasticsearch.search.SearchService.executeFetchPhase(SearchServic e.java:376)  
at org.elasticsearch.search.action.SearchServiceTransportAction$11.call( SearchServiceTransportAction.java:333)  
at org.elasticsearch.search.action.SearchServiceTransportAction$11.call( SearchServiceTransportAction.java:330)  
at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(S earchServiceTransportAction.java:559)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor. java:1142)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor .java:617)  
at java.lang.Thread.run(Thread.java:745)  
Caused by: org.elasticsearch.ElasticsearchException: java.lang.ArrayIndexOutOfBo undsException  
at org.elasticsearch.index.fielddata.plain.AbstractIndexFieldData.load(A bstractIndexFieldData.java:80)  
at org.elasticsearch.index.fielddata.fieldcomparator.LongValuesComparato rSource$1.getLongValues(LongValuesComparatorSource.java:67)  
at org.apache.lucene.search.FieldComparator$LongComparator.setNextReader (FieldComparator.java:716)  
at org.apache.lucene.search.TopFieldCollector$OneComparatorNonScoringCol lector.setNextReader(TopFieldCollector.java:97)  
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:612)  
at org.elasticsearch.search.internal.ContextIndexSearcher.search(Context IndexSearcher.java:191)  
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:581)  
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:533)  
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:510)  
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:345)  
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:150 )  
... 7 more  
Caused by: org.elasticsearch.common.util.concurrent.UncheckedExecutionException: java.lang.ArrayIndexOutOfBoundsException  
at org.elasticsearch.common.cache.LocalCache$Segment.get(LocalCache.java :2203)  
at org.elasticsearch.common.cache.LocalCache.get(LocalCache.java:3937)  
at org.elasticsearch.common.cache.LocalCache$LocalManualCache.get(LocalC ache.java:4739)  
at org.elasticsearch.indices.fielddata.cache.IndicesFieldDataCache$Index FieldCache.load(IndicesFieldDataCache.java:167)  
at org.elasticsearch.index.fielddata.plain.AbstractIndexFieldData.load(A bstractIndexFieldData.java:74)  
... 17 more  
Caused by: java.lang.ArrayIndexOutOfBoundsException  
at org.apache.lucene.store.ByteArrayDataInput.readBytes(ByteArrayDataInp ut.java:165)  
at org.apache.lucene.codecs.blocktree.SegmentTermsEnumFrame.nextLeaf(Seg mentTermsEnumFrame.java:278)  
at org.apache.lucene.codecs.blocktree.SegmentTermsEnumFrame.next(Segment TermsEnumFrame.java:266)  
at org.apache.lucene.codecs.blocktree.SegmentTermsEnum.next(SegmentTerms Enum.java:950)  
at org.apache.lucene.index.FilteredTermsEnum.next(FilteredTermsEnum.java :236)  
at org.elasticsearch.index.fielddata.RamAccountingTermsEnum.next(RamAcco untingTermsEnum.java:82)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:36pm UTC](https://discuss.elastic.co/t/getting-arrayindexoutofboundsexception-when-doing-a-simple-query/35175/2 "2017-07-05T23:36:50Z")

</div>


