# Phrase Suggester: index blocks results from other used indices

**URL:** <https://discuss.elastic.co/t/phrase-suggester-index-blocks-results-from-other-used-indices/61109>\
**Category:** Elasticsearch\
**Created:** [September 21, 2016, 10:58am UTC](https://discuss.elastic.co/t/phrase-suggester-index-blocks-results-from-other-used-indices/61109 "2016-09-21T10:58:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Besan](https://avatars.discourse-cdn.com/v4/letter/b/a88e4f/32.png) [@Besan](https://discuss.elastic.co/u/Besan)\
**Post date:** [September 21, 2016, 10:58am UTC](https://discuss.elastic.co/t/phrase-suggester-index-blocks-results-from-other-used-indices/61109/1 "2016-09-21T10:58:29Z")

</div>

Hi, everyone,

I got a mysterium by using a phrase suggest on multiple indices.

I try to explain what is happen.

This suggest code works fine for 4 different indices with 3 different types.

```
'suggest' => [
            'did-you-mean' => [
                'text' => $query,
                'phrase' => [
                    'max_errors' => 4,
                    'size' => 1,
                    'analyzer' => 'analyzer_did_you_mean',
                    'confidence' => 1.5,
                    'direct_generator' => [
                        [
                            'field' => 'did_you_mean',
                            'suggest_mode' => 'missing'
                        ]
                    ],
                    'field' => 'did_you_mean'
                ]
            ]
        ],

```

I added a 5th index, which contains a positive list of words (like brands or locations).  
After i added this index, the suggester returning only results of this new index. it ignores the other 4.

I tried the following:

- give all indizes the same structure
- give all indizes the same type
- put the data direct in the did\_you\_mean instead copy\_to: 'did\_you\_mean'
- used different ids
- used different suggest\_mode

It is running on ES 2.4.  
I cant find the resaon for this behavior, maybe someone has an idea.  
If further information are needed, I will try to deliver.

Thanks.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [September 21, 2016, 4:44pm UTC](https://discuss.elastic.co/t/phrase-suggester-index-blocks-results-from-other-used-indices/61109/2 "2016-09-21T16:44:34Z")

</div>

Hey,

do you somehow have a different mapping configured for this one? Different analyzer setups? Is this particular index always winning against the others? If so, there might just be a tiny configuration glitch.

If not, we would need a fully reproducible example to see what is happening.

--Alex

---

<div class="post-metadata">

**Author:** ![Besan](https://avatars.discourse-cdn.com/v4/letter/b/a88e4f/32.png) [@Besan](https://discuss.elastic.co/u/Besan)\
**Post date:** [September 22, 2016, 8:27am UTC](https://discuss.elastic.co/t/phrase-suggester-index-blocks-results-from-other-used-indices/61109/3 "2016-09-22T08:27:21Z")

</div>

thx for your ideas but all indices have the same mapping and analyzer configuration.

We solved the problem by using the paramter: 'real\_word\_error\_likelihood' =\> 0.001,  
its not logical but it works,

---

<div class="post-metadata">

**Author:** ![Besan](https://avatars.discourse-cdn.com/v4/letter/b/a88e4f/32.png) [@Besan](https://discuss.elastic.co/u/Besan)\
**Post date:** [September 26, 2016, 3:13pm UTC](https://discuss.elastic.co/t/phrase-suggester-index-blocks-results-from-other-used-indices/61109/4 "2016-09-26T15:13:46Z")

</div>

The Problem is still relevant.

an example, where the 'real\_word\_error\_likelihood' makes no difference anymore:

index\_webpage contains words like : "hotel" and "mallorca"  
index\_didyoumean contains words like: "bosch", "senseo"

with both indices it cant find a "suggest" for "mallorca hote" and no results at all.

If I use only the webpage index it returns "mallorca hotel" with results.

The Docu is not so clear how the suggestion over serveral indices should work.  
Has anybody an idea? If i could undstand the technic behind it would be easier to find a solution.

---

<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 5, 2017, 10:17pm UTC](https://discuss.elastic.co/t/phrase-suggester-index-blocks-results-from-other-used-indices/61109/5 "2017-07-05T22:17:15Z")

</div>


