# Searching for response code, get results without the response code field

**URL:** <https://discuss.elastic.co/t/searching-for-response-code-get-results-without-the-response-code-field/193558>\
**Category:** Kibana\
**Created:** [August 2, 2019, 2:27pm UTC](https://discuss.elastic.co/t/searching-for-response-code-get-results-without-the-response-code-field/193558 "2019-08-02T14:27:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![flex567](https://avatars.discourse-cdn.com/v4/letter/f/ee59a6/32.png) [@flex567](https://discuss.elastic.co/u/flex567)\
**Post date:** [August 2, 2019, 2:27pm UTC](https://discuss.elastic.co/t/searching-for-response-code-get-results-without-the-response-code-field/193558/1 "2019-08-02T14:27:54Z")

</div>

I ma using the Discover tab and I am using the Search field with the following query:  
"NOT response-http-code:(202)".  
The problem is I am getting result with 403 which is correct, but I also see entries without the response-http-code field.

How would I need to setup querry to see the response code not equal to 202 but also not see the entries without response-http-code field?

---

<div class="post-metadata">

**Author:** ![lukeelmers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukeelmers/32/35230_2.png) [@lukeelmers](https://discuss.elastic.co/u/lukeelmers)\
**Post date:** [August 2, 2019, 7:54pm UTC](https://discuss.elastic.co/t/searching-for-response-code-get-results-without-the-response-code-field/193558/2 "2019-08-02T19:54:34Z")

</div>

Hi @flex567,

Does `NOT response-http-code:"202" AND response-http-code:*` work for you?

This _should_ filter to items that don't match `202` and the `*` should make sure only results are returned where there is a value for `response-http-code`

---

<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:** [August 30, 2019, 7:54pm UTC](https://discuss.elastic.co/t/searching-for-response-code-get-results-without-the-response-code-field/193558/3 "2019-08-30T19:54:42Z")

</div>

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