# Phrase suggester with suggest\_mode: missing across multiple indexes yields suggestions even when results exist in one index

**URL:** https://discuss.elastic.co/t/phrase-suggester-with-suggest-mode-missing-across-multiple-indexes-yields-suggestions-even-when-results-exist-in-one-index/17396
**Category:** Elasticsearch
**Created:** [May 7, 2014, 6:10pm UTC](https://discuss.elastic.co/t/phrase-suggester-with-suggest-mode-missing-across-multiple-indexes-yields-suggestions-even-when-results-exist-in-one-index/17396 "2014-05-07T18:10:38Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![loren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/loren/32/44942_2.png) [@loren](https://discuss.elastic.co/u/loren)
#### Post date: [May 7, 2014, 6:10pm UTC](https://discuss.elastic.co/t/phrase-suggester-with-suggest-mode-missing-across-multiple-indexes-yields-suggestions-even-when-results-exist-in-one-index/17396/1 "2014-05-07T18:10:38Z")

</div>

I'm running 1.1.1. I have found a few odd cases where the phrase suggester  
with suggest\_mode: missing generates a suggestion even though the query  
returns results. I am querying across two indexes (and two types), and in  
the cases I have found, the query term only exists in one of the indexes.  
When I re-run the query across just one of the indexes/types and then the  
other, the suggester behaves as expected.

I am trying to come up with a curl recreation but I haven't been able to  
reproduce it yet in a smaller corpus. Meanwhile, is it possible that there  
is a bug in the suggester for suggest\_mode: missing where it incorrectly  
judges that a term is missing from _all_ indexes in the query just because  
it's missing from one index in the query?

--  
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/6a83656b-6232-468c-bb14-9076aa6b8a05%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6a83656b-6232-468c-bb14-9076aa6b8a05%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: [May 7, 2014, 6:19pm UTC](https://discuss.elastic.co/t/phrase-suggester-with-suggest-mode-missing-across-multiple-indexes-yields-suggestions-even-when-results-exist-in-one-index/17396/2 "2014-05-07T18:19:24Z")

</div>

On Wed, May 7, 2014 at 2:10 PM, Loren [loren@siebert.org](mailto:loren@siebert.org) wrote:

> I'm running 1.1.1. I have found a few odd cases where the phrase suggester  
> with suggest\_mode: missing generates a suggestion even though the query  
> returns results. I am querying across two indexes (and two types), and in  
> the cases I have found, the query term only exists in one of the indexes.  
> When I re-run the query across just one of the indexes/types and then the  
> other, the suggester behaves as expected.
> 
> I am trying to come up with a curl recreation but I haven't been able to  
> reproduce it yet in a smaller corpus. Meanwhile, is it possible that there  
> is a bug in the suggester for suggest\_mode: missing where it incorrectly  
> judges that a term is missing from _all_ indexes in the query just  
> because it's missing from one index in the query?

Sure!

To get the phrase suggester to spit things out with smaller corpus try  
setting the shards to 1 and set max\_term\_freq to .99 or something closer to  
one the the default.

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/CAPmjWd0N4G91%3DKG4d%2B53o6mp8RUi\_iTBoR4Oh40CrCb-9wMJUQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAPmjWd0N4G91%3DKG4d%2B53o6mp8RUi_iTBoR4Oh40CrCb-9wMJUQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![loren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/loren/32/44942_2.png) [@loren](https://discuss.elastic.co/u/loren)
#### Post date: [May 7, 2014, 6:30pm UTC](https://discuss.elastic.co/t/phrase-suggester-with-suggest-mode-missing-across-multiple-indexes-yields-suggestions-even-when-results-exist-in-one-index/17396/3 "2014-05-07T18:30:33Z")

</div>

I am already using 1 shard per index, so the query is executing across 2  
shards. I tried setting max\_term\_freq to 0.999 but was still unable to  
reproduce it in a small corpus.

On Wednesday, May 7, 2014 11:19:24 AM UTC-7, Nikolas Everett wrote:

> On Wed, May 7, 2014 at 2:10 PM, Loren \<[lo...@siebert.org](mailto:lo...@siebert.org) \<javascript:\>\>wrote:
> 
> > I'm running 1.1.1. I have found a few odd cases where the phrase  
> > suggester with suggest\_mode: missing generates a suggestion even though the  
> > query returns results. I am querying across two indexes (and two types),  
> > and in the cases I have found, the query term only exists in one of the  
> > indexes. When I re-run the query across just one of the indexes/types and  
> > then the other, the suggester behaves as expected.
> > 
> > I am trying to come up with a curl recreation but I haven't been able to  
> > reproduce it yet in a smaller corpus. Meanwhile, is it possible that there  
> > is a bug in the suggester for suggest\_mode: missing where it incorrectly  
> > judges that a term is missing from _all_ indexes in the query just  
> > because it's missing from one index in the query?
> 
> Sure!
> 
> To get the phrase suggester to spit things out with smaller corpus try  
> setting the shards to 1 and set max\_term\_freq to .99 or something closer to  
> one the the default.
> 
> 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/fd3278f0-c633-4105-a447-89427d1ace16%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/fd3278f0-c633-4105-a447-89427d1ace16%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, 1:30am UTC](https://discuss.elastic.co/t/phrase-suggester-with-suggest-mode-missing-across-multiple-indexes-yields-suggestions-even-when-results-exist-in-one-index/17396/4 "2017-07-06T01:30:59Z")

</div>


