# \[Elasticsearch NEST\] Unable to define language for collate queries

**URL:** <https://discuss.elastic.co/t/elasticsearch-nest-unable-to-define-language-for-collate-queries/129773>\
**Category:** Elasticsearch\
**Created:** [April 27, 2018, 6:43am UTC](https://discuss.elastic.co/t/elasticsearch-nest-unable-to-define-language-for-collate-queries/129773 "2018-04-27T06:43:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ishim](https://avatars.discourse-cdn.com/v4/letter/i/c5a1d2/32.png) [@ishim](https://discuss.elastic.co/u/ishim)\
**Post date:** [April 27, 2018, 6:43am UTC](https://discuss.elastic.co/t/elasticsearch-nest-unable-to-define-language-for-collate-queries/129773/1 "2018-04-27T06:43:09Z")

</div>

I'm using NEST/ElasticSearch 5.4 and I am trying to write a NEST object which uses collate.  
Basically i want to have json something like this:

```
 "collate": {
      "query": {
        "lang" : "my_own_language",
        "inline" : "my_scripting_code"
      },

```

Elasticsearch version:5.4

But, when i try to build a NEST object for above query, I am unable to add "Lang'' node for collate query.

```
 .Collate(c => c
              .Query(q => q
                      .Inline("my_scripting_code")
                      .Lang("my_own_language")
                          )
              .Prune()
)

```

Adding **.Lang("my\_own\_language")** throws error.  
Is there any way to add language type for collate queries?

Thanks,  
Ishita

---

<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:** [May 25, 2018, 6:43am UTC](https://discuss.elastic.co/t/elasticsearch-nest-unable-to-define-language-for-collate-queries/129773/2 "2018-05-25T06:43:10Z")

</div>

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