# API search with null values

**URL:** <https://discuss.elastic.co/t/api-search-with-null-values/186064>\
**Category:** Elasticsearch\
**Created:** [June 17, 2019, 12:31pm UTC](https://discuss.elastic.co/t/api-search-with-null-values/186064 "2019-06-17T12:31:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ocaiquemello](https://avatars.discourse-cdn.com/v4/letter/o/d6d6ee/32.png) [@ocaiquemello](https://discuss.elastic.co/u/ocaiquemello)\
**Post date:** [June 17, 2019, 12:31pm UTC](https://discuss.elastic.co/t/api-search-with-null-values/186064/1 "2019-06-17T12:31:17Z")

</div>

Good day everyone! I'm trying to build a search API with NodeJS but I need to validate the values the users are sending, so if they send a null value, the API will only query for the other values. How can I do that? Thanks in advance.

---

<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 23, 2019, 5:45pm UTC](https://discuss.elastic.co/t/api-search-with-null-values/186064/3 "2019-07-23T17:45:01Z")

</div>

Closed on July 23, 2019, 5:45pm UTC

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