# How to do a suggest query in Low Level Client?

**URL:** <https://discuss.elastic.co/t/how-to-do-a-suggest-query-in-low-level-client/135617>\
**Category:** Elasticsearch\
**Created:** [June 13, 2018, 3:06am UTC](https://discuss.elastic.co/t/how-to-do-a-suggest-query-in-low-level-client/135617 "2018-06-13T03:06:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kartheek91](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@kartheek91](https://discuss.elastic.co/u/kartheek91)\
**Post date:** [June 13, 2018, 3:06am UTC](https://discuss.elastic.co/t/how-to-do-a-suggest-query-in-low-level-client/135617/1 "2018-06-13T03:06:13Z")

</div>

I have a suggest query I need to implement in c# Nest low level client.Can anyone help?

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [June 14, 2018, 12:20am UTC](https://discuss.elastic.co/t/how-to-do-a-suggest-query-in-low-level-client/135617/2 "2018-06-14T00:20:52Z")

</div>

You can send a JSON string, byte array or object using the low level client. If you use the low level client exposed on the high level client through the `.LowLevel` property, you can also take advantage of having a strongly typed `SearchResponse<TDocument>` response. for example, with a JSON string

```auto
var client = new ElasticClient();

var query = @"{
  ""suggest"": {
    ""my-completion-suggest"": {
      ""completion"": {
        ""analyzer"": ""simple"",
        ""contexts"": {
          ""color"": [
            {
              ""context"": ""red""
            }
          ]
        },
        ""field"": ""suggest"",
        ""fuzzy"": {
          ""fuzziness"": ""AUTO"",
          ""min_length"": 1,
          ""prefix_length"": 2,
          ""transpositions"": true,
          ""unicode_aware"": false
        },
        ""size"": 8
      },
      ""prefix"": ""Durgan LLC""
    }
  }
}";

var response = 
    client.LowLevel.Search<SearchResponse<YourDocument>>("index", "type", query);

```

Take a look at [Suggester usage for examples with the high level client](https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/suggest-usage.html)

---

<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:** [July 12, 2018, 12:27am UTC](https://discuss.elastic.co/t/how-to-do-a-suggest-query-in-low-level-client/135617/3 "2018-07-12T00:27:26Z")

</div>

Closed on July 12, 2018, 12:27am UTC

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