# Getting NPE while delete a type in index

**URL:** <https://discuss.elastic.co/t/getting-npe-while-delete-a-type-in-index/112786>\
**Category:** Elasticsearch\
**Created:** [December 21, 2017, 9:53am UTC](https://discuss.elastic.co/t/getting-npe-while-delete-a-type-in-index/112786 "2017-12-21T09:53:16Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [December 21, 2017, 10:05am UTC](https://discuss.elastic.co/t/getting-npe-while-delete-a-type-in-index/112786/2 "2017-12-21T10:05:14Z")

</div>

Please format your code using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

I edited your post but please do it next time.

What is the content of `deleteByQuery` object?  
Any chance that `client` is `null`?

---

_[View the full topic](https://discuss.elastic.co/t/getting-npe-while-delete-a-type-in-index/112786)._
