# Prefix query returns results with empty value

**URL:** <https://discuss.elastic.co/t/prefix-query-returns-results-with-empty-value/357432>\
**Category:** Elasticsearch\
**Created:** [April 15, 2024, 1:01pm UTC](https://discuss.elastic.co/t/prefix-query-returns-results-with-empty-value/357432 "2024-04-15T13:01:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![maheshkumar\_janakira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maheshkumar_janakira/32/133537_2.png) [@maheshkumar\_janakira](https://discuss.elastic.co/u/maheshkumar_janakira)\
**Post date:** [April 15, 2024, 1:01pm UTC](https://discuss.elastic.co/t/prefix-query-returns-results-with-empty-value/357432/1 "2024-04-15T13:01:19Z")

</div>

I am running a simple prefix query against a field , the query returns results even thought I dont send any values (Empty input value) returns everything in the index, How to prevent this from happening? . If there is no search term , it should return no results
