# Suggester for word or phrase from a paragraph in elastic search document

**URL:** https://discuss.elastic.co/t/suggester-for-word-or-phrase-from-a-paragraph-in-elastic-search-document/107034
**Category:** Elasticsearch
**Created:** [November 9, 2017, 11:35am UTC](https://discuss.elastic.co/t/suggester-for-word-or-phrase-from-a-paragraph-in-elastic-search-document/107034 "2017-11-09T11:35:34Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![bnraju81](https://avatars.discourse-cdn.com/v4/letter/b/76d3ee/32.png) [@bnraju81](https://discuss.elastic.co/u/bnraju81)
#### Post date: [November 9, 2017, 11:35am UTC](https://discuss.elastic.co/t/suggester-for-word-or-phrase-from-a-paragraph-in-elastic-search-document/107034/1 "2017-11-09T11:35:34Z")

</div>

Hi All,  
I have a db with index for pages in a site where i index using title and page content, trying to add a suggester search from the page content , i could get a keyword suggester using completion suggesters  
{  
"djcms": {  
"settings": {  
"index": {  
"number\_of\_shards": "5",  
"provided\_name": "djcms",  
"creation\_date": "1510160781495",  
"analysis": {  
"filter": {  
"autocomplete\_filter": {  
"token\_chars": [  
"letter",  
"digit",  
"punctuation",  
"symbol"  
],  
"min\_gram": "3",  
"type": "edgeNGram",  
"max\_gram": "20"  
}  
},  
"analyzer": {  
"autocomplete": {  
"filter": [  
"lowercase",  
"asciifolding",  
"autocomplete\_filter"  
],  
"type": "custom",  
"tokenizer": "standard"  
},  
"whitespace\_analyzer": {  
"filter": [  
"lowercase",  
"asciifolding"  
],  
"type": "custom",  
"tokenizer": "whitespace"  
}  
}  
},  
"number\_of\_replicas": "1",  
"uuid": "9C3mAB5RR2eyYFHBVNN\_sg",  
"version": {  
"created": "5040399"  
}  
}  
}  
}  
}

mapping ={  
"djcms": {  
"mappings": {  
"djcmspage": {  
"properties": {  
"content": {  
"type": "text",  
"analyzer": "autocomplete",  
"search\_analyzer": "whitespace\_analyzer"  
},  
"content\_suggest": {  
"type": "completion",  
"analyzer": "autocomplete",  
"search\_analyzer": "whitespace\_analyzer"  
},  
"title": {  
"type": "text"  
},  
"url": {  
"type": "text"  
}  
}  
}  
}  
}  
}

suggest\_dict = {  
"content-suggest": {  
"text": "capture",  
"completion": {  
"field": "content\_suggest",  
"fuzzy": {  
"fuzziness": 2  
}  
}  
}  
}

This works for single word , but if i search for "capture data" phrase i t doesn't  
Also tokeniser also doesn't work on completion type fields.

can you anyone help on this

---

<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: [December 7, 2017, 11:35am UTC](https://discuss.elastic.co/t/suggester-for-word-or-phrase-from-a-paragraph-in-elastic-search-document/107034/2 "2017-12-07T11:35:38Z")

</div>

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