# Term suggester : strange results

**URL:** <https://discuss.elastic.co/t/term-suggester-strange-results/21080>\
**Category:** Elasticsearch\
**Created:** [December 4, 2014, 12:27pm UTC](https://discuss.elastic.co/t/term-suggester-strange-results/21080 "2014-12-04T12:27:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DH1](https://avatars.discourse-cdn.com/v4/letter/d/65b543/32.png) [@DH1](https://discuss.elastic.co/u/DH1)\
**Post date:** [December 4, 2014, 12:27pm UTC](https://discuss.elastic.co/t/term-suggester-strange-results/21080/1 "2014-12-04T12:27:23Z")

</div>

Hi, everyone,

I'm trying to figure put some discrepencies (I think) in the results of my  
suggesters, with ES V0.90.5.

My indices are big and can contain a wide array of language.  
when I do this (NB : tomate is the french for tomato)  
;

{  
"query": {  
"match\_all": {}  
},  
"suggest": {  
"my\_suggester": {  
"text": "tomate",  
"term": {  
"field": "my\_field"  
}  
}  
}  
}

Es doesn't suggest "tomato". And the terms it suggest are rather  
low-scoring (it even suggests "tote", with a measly 0.5 score)

however, if I do this :

{  
"query": {  
"match\_all": {}  
},  
"suggest": {  
"my\_suggester": {  
"text": "tomato",  
"term": {  
"field": "my\_field"  
}  
}  
}  
}

Es suggests "tomate", along with a buch of lower scoring terms.

As far as I undestand, tomate is as close to tomato as tomato is close to  
tomate, and thus ES should suggest tomato when I'm asking for tomate.  
I'm positive that the two terms are present in the indices; and brought  
back by my request, so that would not be the issue.

So, I wonder ..  
Is there something I did not understand regarding suggesters?  
Is that behaviour normal?  
Is it due to the older version of ES I'm still using?

If anyone using suggesters would help me make sense of this, that'd be  
helpful.  
Thanks

--  
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/d4beac46-8520-472d-9acc-fdaa02dd5d4e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d4beac46-8520-472d-9acc-fdaa02dd5d4e%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [December 4, 2014, 12:48pm UTC](https://discuss.elastic.co/t/term-suggester-strange-results/21080/2 "2014-12-04T12:48:28Z")

</div>

On Thu, Dec 4, 2014 at 7:27 AM, DH [ciddp195@gmail.com](mailto:ciddp195@gmail.com) wrote:

Hi, everyone,

> I'm trying to figure put some discrepencies (I think) in the results of my  
> suggesters, with ES V0.90.5.
> 
> My indices are big and can contain a wide array of language.  
> when I do this (NB : tomate is the french for tomato)  
> ;
> 
> {  
> "query": {  
> "match\_all": {}  
> },  
> "suggest": {  
> "my\_suggester": {  
> "text": "tomate",  
> "term": {  
> "field": "my\_field"  
> }  
> }  
> }  
> }
> 
> Es doesn't suggest "tomato". And the terms it suggest are rather  
> low-scoring (it even suggests "tote", with a measly 0.5 score)
> 
> however, if I do this :
> 
> {  
> "query": {  
> "match\_all": {}  
> },  
> "suggest": {  
> "my\_suggester": {  
> "text": "tomato",  
> "term": {  
> "field": "my\_field"  
> }  
> }  
> }  
> }
> 
> Es suggests "tomate", along with a buch of lower scoring terms.
> 
> As far as I undestand, tomate is as close to tomato as tomato is close to  
> tomate, and thus ES should suggest tomato when I'm asking for tomate.  
> I'm positive that the two terms are present in the indices; and brought  
> back by my request, so that would not be the issue.
> 
> So, I wonder ..  
> Is there something I did not understand regarding suggesters?  
> Is that behaviour normal?  
> Is it due to the older version of ES I'm still using?
> 
> If anyone using suggesters would help me make sense of this, that'd be  
> helpful.  
> Thanks

Try setting these:  
"suggest\_mode": "always",  
"size": 100000,  
"max\_term\_freq": 0.65

and then backing off from there. Your suggestion should come back with all  
the settings and you'll learn more about what is going on.

Depending on how the documents are sharded you can see changes in  
behavior. Its more likely when you have fewer documents.

Nik

--  
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/CAPmjWd0rdwOoSBsSdVMuq\_P7ntqn%2B7YOOZpD\_PyFcqg4%3D99vbA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAPmjWd0rdwOoSBsSdVMuq_P7ntqn%2B7YOOZpD_PyFcqg4%3D99vbA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![DH1](https://avatars.discourse-cdn.com/v4/letter/d/65b543/32.png) [@DH1](https://discuss.elastic.co/u/DH1)\
**Post date:** [December 4, 2014, 1:14pm UTC](https://discuss.elastic.co/t/term-suggester-strange-results/21080/3 "2014-12-04T13:14:38Z")

</div>

Yes ! Thank a lot, "mode : always" did the trick.

Now, I just have some strange frequency numbers .. suggesters boasts 203  
"tomato", whereas a query only return 97.  
The frequencies are less important, so I guess I'll be able to live with  
that.

Thank again

--  
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/8e58d7a1-5cac-4535-afb9-fe58be574aa5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8e58d7a1-5cac-4535-afb9-fe58be574aa5%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:45am UTC](https://discuss.elastic.co/t/term-suggester-strange-results/21080/4 "2017-07-06T00:45:57Z")

</div>


