# NullPointerException after updating Elasticsearch to 1.6

**URL:** <https://discuss.elastic.co/t/nullpointerexception-after-updating-elasticsearch-to-1-6/24995>\
**Category:** Elasticsearch\
**Created:** [July 6, 2015, 10:03pm UTC](https://discuss.elastic.co/t/nullpointerexception-after-updating-elasticsearch-to-1-6/24995 "2015-07-06T22:03:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pradeep\_Gowda](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@Pradeep\_Gowda](https://discuss.elastic.co/u/Pradeep_Gowda)\
**Post date:** [July 6, 2015, 10:03pm UTC](https://discuss.elastic.co/t/nullpointerexception-after-updating-elasticsearch-to-1-6/24995/1 "2015-07-06T22:03:44Z")

</div>

Below query is failing after I updated ElasticSearch to 1.6 from 1.4.4

GET index\_name/\_search  
{  
"query": {  
"filtered": {  
"filter": {  
"bool": {  
"must": [  
{  
"term": {  
"acknowledged": false  
}  
},  
{  
"term": {  
"active": false  
}  
},  
{  
"exists": {  
"field": "cleared\_time"  
}  
}  
],  
"must\_not": {  
"term": {  
"severity\_number": 4  
}  
}  
}  
}  
}  
}

and below is the exception

org.elasticsearch.index.query.QueryParsingException: [index\_name] Failed to parse  
at org.elasticsearch.index.query.IndexQueryParserService.parseQuery(IndexQueryParserService.java:370)  
at org.elasticsearch.action.count.TransportCountAction.shardOperation(TransportCountAction.java:187)  
at org.elasticsearch.action.count.TransportCountAction.shardOperation(TransportCountAction.java:66)  
at org.elasticsearch.action.support.broadcast.TransportBroadcastOperationAction$AsyncBroadcastAction$1.run(TransportBroadcastOperationAction.java:170)  
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: java.lang.NullPointerException  
at org.elasticsearch.index.query.ExistsFilterParser.newFilter(ExistsFilterParser.java:87)  
at org.elasticsearch.index.query.ExistsFilterParser.parse(ExistsFilterParser.java:82)  
at org.elasticsearch.index.query.QueryParseContext.executeFilterParser(QueryParseContext.java:368)  
at org.elasticsearch.index.query.QueryParseContext.parseInnerFilter(QueryParseContext.java:349)  
at org.elasticsearch.index.query.BoolFilterParser.parse(BoolFilterParser.java:92)  
at org.elasticsearch.index.query.QueryParseContext.executeFilterParser(QueryParseContext.java:368)  
at org.elasticsearch.index.query.QueryParseContext.parseInnerFilter(QueryParseContext.java:349)  
at org.elasticsearch.index.query.FilteredQueryParser.parse(FilteredQueryParser.java:74)  
at org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:302)  
at org.elasticsearch.index.query.IndexQueryParserService.innerParse(IndexQueryParserService.java:382)  
at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:281)  
at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:276)  
at org.elasticsearch.index.query.IndexQueryParserService.parseQuery(IndexQueryParserService.java:354)

There are 0 records in the index and same query works fine with ES 1.4.4.

If I remove  
{  
"exists": {  
"field": "cleared\_time"  
}  
}  
from query in ES 1.6, it executes fine and returns the expected result.

Can i know what has changed from ES 1.4.4 to 1.6 and how to fix this exception?

Thanks.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 6, 2015, 10:47pm UTC](https://discuss.elastic.co/t/nullpointerexception-after-updating-elasticsearch-to-1-6/24995/2 "2015-07-06T22:47:43Z")

</div>

Does the mapping exist for this field?

---

<div class="post-metadata">

**Author:** ![Pradeep\_Gowda](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@Pradeep\_Gowda](https://discuss.elastic.co/u/Pradeep_Gowda)\
**Post date:** [July 6, 2015, 11:12pm UTC](https://discuss.elastic.co/t/nullpointerexception-after-updating-elasticsearch-to-1-6/24995/3 "2015-07-06T23:12:31Z")

</div>

Yes, I can see mapping for all four fields. Below is the mapping

{  
"index\_name": {  
"aliases": {},  
"mappings": {  
"_default_": {  
"\_timestamp": {  
"enabled": true,  
"store": true  
},  
"properties": {  
"acknowledged": {  
"type": "boolean"  
},  
"active": {  
"type": "boolean"  
},  
"cleared\_time": {  
"type": "date",  
"format": "dateOptionalTime"  
},  
"severity\_number": {  
"type": "long"  
}  
}  
}  
},  
"settings": {  
"index": {  
"creation\_date": "1436217586038",  
"number\_of\_shards": "5",  
"number\_of\_replicas": "1",  
"version": {  
"created": "1060099"  
},  
"uuid": "1HHZ-xxx"  
}  
},  
"warmers": {}  
}  
}

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 7, 2015, 5:48am UTC](https://discuss.elastic.co/t/nullpointerexception-after-updating-elasticsearch-to-1-6/24995/4 "2015-07-07T05:48:48Z")

</div>

I would probably open an issue with a script which reproduces it.

---

<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 6, 2017, 12:03am UTC](https://discuss.elastic.co/t/nullpointerexception-after-updating-elasticsearch-to-1-6/24995/5 "2017-07-06T00:03:20Z")

</div>


