# Strange behaviour phrase suggester

**URL:** <https://discuss.elastic.co/t/strange-behaviour-phrase-suggester/21719>\
**Category:** Elasticsearch\
**Created:** [January 19, 2015, 9:17pm UTC](https://discuss.elastic.co/t/strange-behaviour-phrase-suggester/21719 "2015-01-19T21:17:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Silvestre\_Losada](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@Silvestre\_Losada](https://discuss.elastic.co/u/Silvestre_Losada)\
**Post date:** [January 19, 2015, 9:17pm UTC](https://discuss.elastic.co/t/strange-behaviour-phrase-suggester/21719/1 "2015-01-19T21:17:29Z")

</div>

Hi all I'm using phrase suggester to obtain spell check corrections over  
user query. I have on my corpus the next words

spider, spyder, spade, spde

I want to get suggestions for spider and I'm entering next query,

"suggest" : {  
"spell\_ngram" : {  
"text" : "spider",  
"phrase" : {  
"field" : "spell\_ngram",  
"size" : 5,  
"confidence" : 0.7,  
"max\_errors" : 0.9,  
"gram\_size" : 5

```
  }
}

```

}

## The output is spell\_ngram: [1] 0: { text: "spider" offset: 0 length: 6 options: [3] 0: { text: "spade" score: 0.15242973 }

## 1: { text: "spde" score: 0.077127695 }

## 2: { text: "spider" score: 0.07542856 }

- 

## }

- 

}

I think that spyder should be the best one because the edit distance is 1,  
is there any thing that I'm doing wrong.

Best

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/6c576390-fc88-4731-a009-ea1dac82648e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6c576390-fc88-4731-a009-ea1dac82648e%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 12:37am UTC](https://discuss.elastic.co/t/strange-behaviour-phrase-suggester/21719/2 "2017-07-06T00:37:55Z")

</div>


