# Phrase Suggest - Using collate causes timeout

**URL:** <https://discuss.elastic.co/t/phrase-suggest-using-collate-causes-timeout/46072>\
**Category:** Elasticsearch\
**Created:** [April 1, 2016, 3:14pm UTC](https://discuss.elastic.co/t/phrase-suggest-using-collate-causes-timeout/46072 "2016-04-01T15:14:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BenSeb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benseb/32/8714_2.png) [@BenSeb](https://discuss.elastic.co/u/BenSeb)\
**Post date:** [April 1, 2016, 3:14pm UTC](https://discuss.elastic.co/t/phrase-suggest-using-collate-causes-timeout/46072/1 "2016-04-01T15:14:20Z")

</div>

Hi,

We're using ElasticSearch via AWS. So far we've implemented the following , which works fine

```
	$params = [
			'index' => 'logstash1',
			'type' => 'event',
			'body' => [
				'query'=>[
					'filtered' => [
							'query' => [
									'match' => [
											'_all' => $keyword,

									],

							],
							'filter'=>[
								'range'=>$dateRange
							]
					]
					],

					'suggest'=> [
							"text" => $keyword,
							"my-suggestion" => [

								"phrase"=>[
									"field" => "name",
									"size" => 3,
									"real_word_error_likelihood" => 0.5,
									"highlight" => [
											"pre_tag"=> "<em>",
          									"post_tag"=> "</em>"
        							],
									/*"collate"=> [
											"query"=> [
												"match"=> [
													"name" => "{{suggestion}}"
												 ]
											   ]
									]*/
								]

  							]

					],
					'_source'=> ['id'],
					'sort'=>['date'=>['order'=>'asc']]
					]

	];

```

However, as you can see, 'collate' within the phrase suggestion is commented out. We would like to use this feature, but when we implement it, we get a 'gateway timeout'

Have we configured something incorrectly?

---

<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 5, 2017, 11:03pm UTC](https://discuss.elastic.co/t/phrase-suggest-using-collate-causes-timeout/46072/2 "2017-07-05T23:03:12Z")

</div>


