Spell Check API .NET NEST Client

Hi,

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

{
 "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 :

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,

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