# NEST/ElasticSearch.Net Phrase Suggester Collate issue

**URL:** <https://discuss.elastic.co/t/nest-elasticsearch-net-phrase-suggester-collate-issue/99748>\
**Category:** Elasticsearch\
**Created:** [September 7, 2017, 4:42pm UTC](https://discuss.elastic.co/t/nest-elasticsearch-net-phrase-suggester-collate-issue/99748 "2017-09-07T16:42:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tsquires](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsquires/32/21892_2.png) [@tsquires](https://discuss.elastic.co/u/tsquires)\
**Post date:** [September 7, 2017, 4:42pm UTC](https://discuss.elastic.co/t/nest-elasticsearch-net-phrase-suggester-collate-issue/99748/1 "2017-09-07T16:42:46Z")

</div>

I'm using NEST/ElasticSearch 5.3 and when running a collate query with parameters on a phrase suggester the json produced and sent to the server looks like this with the params object inside of the query object:

```json
        "collate": {
          "query": {
            "id": "suggestCollate",
            "params": {
              "field-name": "name",
              "site-id": "1",
              "region-id": "1",
              "industry-id": "4"
            }
          },
          "prune": true
        }

```

While a working query when setting up the json manually looks like this with the params object inside of the collate object instead:

```json
        "collate": {
        	"query": {
        		"id": "suggestCollate"
        	},
        	"params": {
        		"field-name": "name",
        		"site-id": "1",
        		"region-id": "1",
        		"industry-id": "4"
        		},
        	"prune": true
        }

```

I'm thinking this is an issue the PhraseSuggestCollate object in NEST but wanted to see if anybody had any other ideas before submitting an issue on github.

Thanks!

---

<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:** [September 8, 2017, 9:17am UTC](https://discuss.elastic.co/t/nest-elasticsearch-net-phrase-suggester-collate-issue/99748/2 "2017-09-08T09:17:49Z")

</div>

Hey @tsquires, thanks for raising this. [It does indeed look like a bug](https://github.com/elastic/elasticsearch-net/blob/master/src/Nest/Search/Suggesters/PhraseSuggester/PhraseSuggestCollate.cs#L12), would you mind [opening an issue](https://github.com/elastic/elasticsearch-net/issues) for this?

---

<div class="post-metadata">

**Author:** ![tsquires](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsquires/32/21892_2.png) [@tsquires](https://discuss.elastic.co/u/tsquires)\
**Post date:** [September 8, 2017, 7:10pm UTC](https://discuss.elastic.co/t/nest-elasticsearch-net-phrase-suggester-collate-issue/99748/3 "2017-09-08T19:10:12Z")

</div>

Sure thing, just submitted the issue, thanks for the reply.

---

<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:** [October 6, 2017, 7:10pm UTC](https://discuss.elastic.co/t/nest-elasticsearch-net-phrase-suggester-collate-issue/99748/4 "2017-10-06T19:10:18Z")

</div>

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