# Phrase suggester not working term suggester is working

**URL:** https://discuss.elastic.co/t/phrase-suggester-not-working-term-suggester-is-working/129102
**Category:** Elasticsearch
**Created:** [April 23, 2018, 12:52pm UTC](https://discuss.elastic.co/t/phrase-suggester-not-working-term-suggester-is-working/129102 "2018-04-23T12:52:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Atul\_Bagga](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/atul_bagga/32/15047_2.png) [@Atul\_Bagga](https://discuss.elastic.co/u/Atul_Bagga)
#### Post date: [April 23, 2018, 12:52pm UTC](https://discuss.elastic.co/t/phrase-suggester-not-working-term-suggester-is-working/129102/1 "2018-04-23T12:52:27Z")

</div>

Is there a setting which governs if one is disabled?

I have an ES deployment where phrase suggester does not suggest anything while term suggester does.

This does not give any suggestions-

GET index\_name/type/\_search  
{  
"size":0,  
"suggest": {  
"text": { "projec",  
"simple\_phrase": {  
**"phrase"** : {  
"field": "name"  
}  
}  
}  
}  
}

Changing **"phrase"** to **"term"** starts working and gives the suggestion

GET index\_name/type/\_search  
{  
"size":0,  
"suggest": {  
"text": { "projec",  
"simple\_phrase": {  
**"term"** : {  
"field": "name"  
}  
}  
}  
}  
}

I want to use phrase suggester so I can filter the suggestions on the basis of collate query I run. So I cannot work with term suggester.

---

<div class="post-metadata">

### Author: ![Atul\_Bagga](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/atul_bagga/32/15047_2.png) [@Atul\_Bagga](https://discuss.elastic.co/u/Atul_Bagga)
#### Post date: [April 25, 2018, 3:06pm UTC](https://discuss.elastic.co/t/phrase-suggester-not-working-term-suggester-is-working/129102/2 "2018-04-25T15:06:27Z")

</div>

Thanks to @ishim for pointing me to the missing "confidence" param because of which suggestions were not coming.

The query should have correct confidence value to return the suggestions- (read more [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters.html))

GET index\_name/type/\_search  
{  
"size":0,  
"suggest": {  
"text": { "projec",  
"simple\_phrase": {  
"phrase": {  
"field": "name",  
"confidence":0  
}  
}  
}  
}  
}

---

<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 23, 2018, 3:06pm UTC](https://discuss.elastic.co/t/phrase-suggester-not-working-term-suggester-is-working/129102/3 "2018-05-23T15:06:31Z")

</div>

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