# How to combine exact search and wildcard in elasticsearch simple\_query\_string

**URL:** <https://discuss.elastic.co/t/how-to-combine-exact-search-and-wildcard-in-elasticsearch-simple-query-string/231445>\
**Category:** Elasticsearch\
**Created:** [May 7, 2020, 3:41am UTC](https://discuss.elastic.co/t/how-to-combine-exact-search-and-wildcard-in-elasticsearch-simple-query-string/231445 "2020-05-07T03:41:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![111330](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111330/32/46467_2.png) [@111330](https://discuss.elastic.co/u/111330)\
**Post date:** [May 7, 2020, 3:41am UTC](https://discuss.elastic.co/t/how-to-combine-exact-search-and-wildcard-in-elasticsearch-simple-query-string/231445/1 "2020-05-07T03:41:16Z")

</div>

I tried:

```auto
GET /_search
{
  "query": {
    "simple_query_string" : {
        "query": "\"sometext*\"",
        "fields": ["name"],
        "default_operator": "and",
        "quote_field_suffix": '.raw',
        "analyze_wildcard": true
    }
  }
}

```

but the search result is incorrect.

for example, there is an index:

```auto
1. prefixsometext
2. sometextone
3. sometexttwo

```

I need to find only 2 and 3 when querying "sometext\*"

---

<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:** [June 4, 2020, 3:41am UTC](https://discuss.elastic.co/t/how-to-combine-exact-search-and-wildcard-in-elasticsearch-simple-query-string/231445/2 "2020-06-04T03:41:22Z")

</div>

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