# Issue with Query string query

**URL:** <https://discuss.elastic.co/t/issue-with-query-string-query/228967>\
**Category:** Elasticsearch\
**Created:** [April 21, 2020, 5:56am UTC](https://discuss.elastic.co/t/issue-with-query-string-query/228967 "2020-04-21T05:56:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MKU](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mku/32/48327_2.png) [@MKU](https://discuss.elastic.co/u/MKU)\
**Post date:** [April 21, 2020, 5:56am UTC](https://discuss.elastic.co/t/issue-with-query-string-query/228967/1 "2020-04-21T05:56:43Z")

</div>

Hi all,

I am using [query string query](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html) to evaluate a boolean expression.

Here is my query,

```auto
{
    "query": {
        "query_string" : {
            "query" : "((A=User) AND((B=rsana) OR(C=rsana)OR(D=rsana)))",
            "analyze_wildcard":true
        
        }
    }

```

}

The above query is giving undesired results, it is suppose to give fields with **rsana** substring in it. instead it gives me all records with any of these alphabets in it "r","s","a","n".  
And if i use _\*rsana_\*, that is if i use wild cards, i get no results.

Does any one have idea about this.

Regards,  
Mohan

---

<div class="post-metadata">

**Author:** ![Opster\_Community1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/opster_community1/32/59062_2.png) [@Opster\_Community1](https://discuss.elastic.co/u/Opster_Community1)\
**Post date:** [April 21, 2020, 6:43am UTC](https://discuss.elastic.co/t/issue-with-query-string-query/228967/2 "2020-04-21T06:43:12Z")

</div>

Can you please add steps to replicate the issue. This will include dsl for following:

1. create an index
2. index sample documents
3. query (which you have already added)

and expected documents in result.

---

<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 19, 2020, 6:43am UTC](https://discuss.elastic.co/t/issue-with-query-string-query/228967/3 "2020-05-19T06:43:15Z")

</div>

Closed on May 19, 2020, 6:43am UTC

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