# NEST syntax wild card search completion field

**URL:** <https://discuss.elastic.co/t/nest-syntax-wild-card-search-completion-field/365645>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [August 27, 2024, 8:59pm UTC](https://discuss.elastic.co/t/nest-syntax-wild-card-search-completion-field/365645 "2024-08-27T20:59:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xef](https://avatars.discourse-cdn.com/v4/letter/x/898d66/32.png) [@xef](https://discuss.elastic.co/u/xef)\
**Post date:** [August 27, 2024, 8:59pm UTC](https://discuss.elastic.co/t/nest-syntax-wild-card-search-completion-field/365645/1 "2024-08-27T20:59:23Z")

</div>

We ahve an index with a completion field for autocomplete look ups.  
Is there any way of using a wild card search as opposed to a prefix to search the index.

Our index is very small (100,000 records).  
Thanks

```auto
var searchResponse = client.Search<Locality>(s => s
        .Size(MAX_SUGGESTIONS)
        .Suggest(ss => ss
            .Completion("suggestions", c => c
                .Field("localitySuggestions")
                .Size(MAX_SUGGESTIONS)
               // .Prefix(prefix)
               .Regex($".*{prefix}*")
            //.SkipDuplicates()
            //.Contexts(ctxs=>ctxs/*.Context("country", ctx => ctx.Context("ie").Boost(3))*/.Context("flags", ctx => ctx.Context("13").Boost(3)))
            )
        ).Index(index)
    );
return searchResponse;

```

---

<div class="post-metadata">

**Author:** ![flobernd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flobernd/32/124877_2.png) [@flobernd](https://discuss.elastic.co/u/flobernd)\
**Post date:** [August 28, 2024, 8:00am UTC](https://discuss.elastic.co/t/nest-syntax-wild-card-search-completion-field/365645/2 "2024-08-28T08:00:36Z")

</div>

Hi @xef,

I just asked this question internally and we don't think this is possible with completion suggesters at all.

The documentation as well does not mention anything like this:

> **[Suggesters | Elasticsearch Guide \[8.15\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters.html#querying)**

---

<div class="post-metadata">

**Author:** ![xef](https://avatars.discourse-cdn.com/v4/letter/x/898d66/32.png) [@xef](https://discuss.elastic.co/u/xef)\
**Post date:** [August 28, 2024, 11:30am UTC](https://discuss.elastic.co/t/nest-syntax-wild-card-search-completion-field/365645/3 "2024-08-28T11:30:23Z")

</div>

Thank you.
