# Spell Check API .NET NEST Client

**URL:** <https://discuss.elastic.co/t/spell-check-api-net-nest-client/312007>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [August 12, 2022, 11:14am UTC](https://discuss.elastic.co/t/spell-check-api-net-nest-client/312007 "2022-08-12T11:14:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Biplab](https://avatars.discourse-cdn.com/v4/letter/b/46a35a/32.png) [@Biplab](https://discuss.elastic.co/u/Biplab)\
**Post date:** [August 12, 2022, 11:14am UTC](https://discuss.elastic.co/t/spell-check-api-net-nest-client/312007/1 "2022-08-12T11:14:58Z")

</div>

Hi,

I am working on spell check query by using phrase suggester, Elasticsearch query for the same is :

```nohighlight
{
 "suggest": {
   "text" : "input_text",
   "simple_phrase" : {
     "phrase" : {
       "field" : "title",
       "size" : 1
     }
   }
 }
}

```

I am trying to write the above query in .NET, I have written the below code for .NET, but its throwing error :

```auto
var searchResponse = elasticClient.Search<Spellcheck>(s => s
        .Suggest(su => su
            .Text(input_query)
            .Simple_phrase(sp => sp
            .Phrase(p => p
            .Field(f => f.title)
                )
            .Size(1)
            )
        )
    );

```

can anyone please help me to write the query in .NET code.

Thanks,

---

<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:** [September 9, 2022, 11:15am UTC](https://discuss.elastic.co/t/spell-check-api-net-nest-client/312007/2 "2022-09-09T11:15:56Z")

</div>

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