# Completion Suggester on existing index and fields

**URL:** <https://discuss.elastic.co/t/completion-suggester-on-existing-index-and-fields/17008>\
**Category:** Elasticsearch\
**Created:** [April 14, 2014, 9:14pm UTC](https://discuss.elastic.co/t/completion-suggester-on-existing-index-and-fields/17008 "2014-04-14T21:14:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnthonyNystrom](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anthonynystrom/32/1066_2.png) [@AnthonyNystrom](https://discuss.elastic.co/u/AnthonyNystrom)\
**Post date:** [April 14, 2014, 9:14pm UTC](https://discuss.elastic.co/t/completion-suggester-on-existing-index-and-fields/17008/1 "2014-04-14T21:14:05Z")

</div>

Is there anyway to suggest field mappings on an existing index's fields?  
Rather than having to create the suggestions manually?

For example:

Existing index field: domains

I would like to use that field for suggester as well, and the data already  
in that field.

Thoughts?

--  
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/15989c48-d144-409c-a477-d8ca6c74ca40%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/15989c48-d144-409c-a477-d8ca6c74ca40%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Binh\_Ly\_2](https://avatars.discourse-cdn.com/v4/letter/b/d07c76/32.png) [@Binh\_Ly\_2](https://discuss.elastic.co/u/Binh_Ly_2)\
**Post date:** [April 16, 2014, 2:16pm UTC](https://discuss.elastic.co/t/completion-suggester-on-existing-index-and-fields/17008/2 "2014-04-16T14:16:02Z")

</div>

Unfortunately not for the completion suggester. The reason is because the  
completion suggester uses an optimized data structure that is populated at  
index-time. So you have to reindex your data (with the completion type) to  
build that data structure.

--  
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/4c39c0cc-8ac0-4be7-83a6-1678a7212a06%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4c39c0cc-8ac0-4be7-83a6-1678a7212a06%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [April 21, 2014, 12:35pm UTC](https://discuss.elastic.co/t/completion-suggester-on-existing-index-and-fields/17008/3 "2014-04-21T12:35:41Z")

</div>

Hey

this is currently not possible. From my experience, just adding arbitrary  
suggestions with the same weight is not resulting in a good user  
experience. Check out amazon for example, if you enter "iphone", the first  
match is definately ranked in the suggestions, as this is not an iphone  
case or the old iphone 3, but the most up to date one. This number might be  
based on the selections for example, but it is rarely not ranked.

Will arbitrary non-ranked suggestions work in your case? (at the end of the  
day, adding suggestions has two goals: Guiding the user faster to what he  
most likely wants, and in addition maybe even offloading the search engine,  
as suggestions might be more light-weight then queries).

--Alex

On Mon, Apr 14, 2014 at 11:14 PM, AnthonyNystrom  
[nystrom.anthony@gmail.com](mailto:nystrom.anthony@gmail.com)wrote:

> Is there anyway to suggest field mappings on an existing index's fields?  
> Rather than having to create the suggestions manually?
> 
> For example:
> 
> Existing index field: domains
> 
> I would like to use that field for suggester as well, and the data already  
> in that field.
> 
> Thoughts?
> 
> --  
> 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/15989c48-d144-409c-a477-d8ca6c74ca40%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/15989c48-d144-409c-a477-d8ca6c74ca40%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/15989c48-d144-409c-a477-d8ca6c74ca40%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/15989c48-d144-409c-a477-d8ca6c74ca40%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAGCwEM\_BUp\_ca\_LseiNj-OM3tX%2B3eXVmu\_%3D242Y4Vsp5v4g-ow%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM_BUp_ca_LseiNj-OM3tX%2B3eXVmu_%3D242Y4Vsp5v4g-ow%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![AnthonyNystrom](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anthonynystrom/32/1066_2.png) [@AnthonyNystrom](https://discuss.elastic.co/u/AnthonyNystrom)\
**Post date:** [April 22, 2014, 7:36am UTC](https://discuss.elastic.co/t/completion-suggester-on-existing-index-and-fields/17008/4 "2014-04-22T07:36:15Z")

</div>

Hi thanks for the information...

Question then ...

I indeed do need to reindex from my river anyway. However, that field that  
I want to use for completion suggester is also a field that is needed in  
the primary index.

I suppose I could create a river from the single field using the "exclude"  
fields feature of mongoriver....

Thoughts?

On Wednesday, April 16, 2014 9:16:02 AM UTC-5, Binh Ly wrote:

> Unfortunately not for the completion suggester. The reason is because the  
> completion suggester uses an optimized data structure that is populated at  
> index-time. So you have to reindex your data (with the completion type) to  
> build that data structure.

--  
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/4c78194c-a9a3-486f-a8ee-4ae5bfc17183%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4c78194c-a9a3-486f-a8ee-4ae5bfc17183%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![AnthonyNystrom](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anthonynystrom/32/1066_2.png) [@AnthonyNystrom](https://discuss.elastic.co/u/AnthonyNystrom)\
**Post date:** [April 22, 2014, 6:39pm UTC](https://discuss.elastic.co/t/completion-suggester-on-existing-index-and-fields/17008/5 "2014-04-22T18:39:41Z")

</div>

Hi Alex:

"Will arbitrary non-ranked suggestions work in your case?" -\> I suppose they would yes. What is your suggestion?

One would think that I could create a new index mapping with an alias to the existing index however where in index is completion ...

...

---

<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:34am UTC](https://discuss.elastic.co/t/completion-suggester-on-existing-index-and-fields/17008/6 "2017-07-06T01:34:17Z")

</div>


