# Query in Nest

**URL:** <https://discuss.elastic.co/t/query-in-nest/159831>\
**Category:** Elasticsearch\
**Created:** [December 7, 2018, 2:31am UTC](https://discuss.elastic.co/t/query-in-nest/159831 "2018-12-07T02:31:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paulo\_Henrique\_PH](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paulo_henrique_ph/32/14831_2.png) [@Paulo\_Henrique\_PH](https://discuss.elastic.co/u/Paulo_Henrique_PH)\
**Post date:** [December 7, 2018, 2:31am UTC](https://discuss.elastic.co/t/query-in-nest/159831/1 "2018-12-07T02:31:30Z")

</div>

Hi guys,

I'm trying to produce the request below in [NEST.NET](http://NEST.NET):  
GET / **INDEX** /\_search?q=DESCRIPTION:windowS

The problem is, the INDEX in question is a dynamic, therefore I won't be able to use it with a strongly typed **FIELD** as most of the documentation/articles says.

Any ideas?

I normally use the LowLevel client for aggregations, but for this search API I could not find a solution yet.

Cheers

---

<div class="post-metadata">

**Author:** ![Paulo\_Henrique\_PH](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paulo_henrique_ph/32/14831_2.png) [@Paulo\_Henrique\_PH](https://discuss.elastic.co/u/Paulo_Henrique_PH)\
**Post date:** [December 10, 2018, 12:34am UTC](https://discuss.elastic.co/t/query-in-nest/159831/2 "2018-12-10T00:34:42Z")

</div>

This did the tric;k:

```
        var esResponse = Connection.Client.GetInstance().Search<DynamicResponse>(i => i.Index(physicalIndexName)
                                                                                       .Type(physicalIndexName)
                                                                                       .Query(q => q
                                                                                       .Match(m => m
                                                                                       .Field( **"FIELD NAME"** )
                                                                                       .Query( **FIELD VALUE** ))));
```

---

<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:** [January 7, 2019, 12:34am UTC](https://discuss.elastic.co/t/query-in-nest/159831/3 "2019-01-07T00:34:50Z")

</div>

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