# Query String - Query with and without wildcards

**URL:** <https://discuss.elastic.co/t/query-string-query-with-and-without-wildcards/81912>\
**Category:** Elasticsearch\
**Created:** [April 11, 2017, 5:10am UTC](https://discuss.elastic.co/t/query-string-query-with-and-without-wildcards/81912 "2017-04-11T05:10:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajtt](https://avatars.discourse-cdn.com/v4/letter/r/47e85d/32.png) [@rajtt](https://discuss.elastic.co/u/rajtt)\
**Post date:** [April 11, 2017, 5:10am UTC](https://discuss.elastic.co/t/query-string-query-with-and-without-wildcards/81912/1 "2017-04-11T05:10:26Z")

</div>

Version: 5.1

We are getting different hits sets when executing query with and without \*

The below query returns 8 records when we expect about 44 records.

"query": {  
"query\_string": {  
"query": "(application:1000000001 AND application\_owner\_account:2000000001)"  
}  
},

Including wildcard returns the correct set of results - 44 records

"query": {  
"query\_string": {  
"query": "(application:1000000001\* AND application\_owner\_account:2000000001)"  
}  
},

We did not see this issue in development and happens only in production environment. Can anyone explain me this behavior?

---

<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:** [May 9, 2017, 5:18am UTC](https://discuss.elastic.co/t/query-string-query-with-and-without-wildcards/81912/2 "2017-05-09T05:18:31Z")

</div>

Closed on May 9, 2017, 5:18am UTC

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