# Need some tips on suggest / autocomplete

**URL:** <https://discuss.elastic.co/t/need-some-tips-on-suggest-autocomplete/9276>\
**Category:** Elasticsearch\
**Created:** [October 8, 2012, 4:04pm UTC](https://discuss.elastic.co/t/need-some-tips-on-suggest-autocomplete/9276 "2012-10-08T16:04:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benoit](https://avatars.discourse-cdn.com/v4/letter/b/5daacb/32.png) [@Benoit](https://discuss.elastic.co/u/Benoit)\
**Post date:** [October 8, 2012, 4:04pm UTC](https://discuss.elastic.co/t/need-some-tips-on-suggest-autocomplete/9276/1 "2012-10-08T16:04:40Z")

</div>

Hi,

I've search the ML about suggest / auto-complete.

The best way to implement this seems to use a multi-field with an edgeNgram  
analyzer.  
Ok. But how do you build the suggested words list ?

Any tips ?

Benoît

--

---

<div class="post-metadata">

**Author:** ![Itamar\_Syn\_Hershko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/itamar_syn_hershko/32/725_2.png) [@Itamar\_Syn\_Hershko](https://discuss.elastic.co/u/Itamar_Syn_Hershko)\
**Post date:** [October 8, 2012, 4:52pm UTC](https://discuss.elastic.co/t/need-some-tips-on-suggest-autocomplete/9276/2 "2012-10-08T16:52:23Z")

</div>

Lucene 4 is just around the corner, I'd wait for it as it has better  
support for this

On Mon, Oct 8, 2012 at 6:04 PM, Benoît [benoit.intrw@gmail.com](mailto:benoit.intrw@gmail.com) wrote:

> Hi,
> 
> I've search the ML about suggest / auto-complete.
> 
> The best way to implement this seems to use a multi-field with an  
> edgeNgram analyzer.  
> Ok. But how do you build the suggested words list ?
> 
> Any tips ?
> 
> Benoît
> 
> --

--

---

<div class="post-metadata">

**Author:** ![Chris\_Male](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chris_male/32/2607_2.png) [@Chris\_Male](https://discuss.elastic.co/u/Chris_Male)\
**Post date:** [October 9, 2012, 3:06am UTC](https://discuss.elastic.co/t/need-some-tips-on-suggest-autocomplete/9276/3 "2012-10-09T03:06:56Z")

</div>

The EdgeNGram approach analyzes content as it goes into the index, forming  
the grams which are used to find suggestions. Consequently the 'suggested  
word list' is whatever you put into the index. This could either be your  
actual indexed content, or it could be an index you created specifically to  
provide suggestions.

On Tuesday, October 9, 2012 5:04:40 AM UTC+13, Benoît wrote:

> Hi,
> 
> I've search the ML about suggest / auto-complete.
> 
> The best way to implement this seems to use a multi-field with an  
> edgeNgram analyzer.  
> Ok. But how do you build the suggested words list ?
> 
> Any tips ?
> 
> Benoît

--

---

<div class="post-metadata">

**Author:** ![otisg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/otisg/32/492_2.png) [@otisg](https://discuss.elastic.co/u/otisg)\
**Post date:** [October 9, 2012, 3:39am UTC](https://discuss.elastic.co/t/need-some-tips-on-suggest-autocomplete/9276/4 "2012-10-09T03:39:15Z")

</div>

Hi Benoît,

Have you looked at [GitHub - spinscale/elasticsearch-suggest-plugin: Plugin for elasticsearch which uses the lucene FSTSuggester](https://github.com/spinscale/elasticsearch-suggest-plugin) (based  
on Lucene's FST suggester)?

People who use our suggester (  
[Cloud Monitoring Tools & Services | Sematext](http://sematext.com/products/autocomplete/index.html)) tend to feed field(s)  
from their main index as suggestions, e.g., product names, book author  
names, etc. If you look at [http://search-lucene.com/](http://search-lucene.com/) you'll see we do  
something similar there - Wiki page titles, JIRA issues, email subjects,  
etc. are all fed into AC and used for suggestions.

We've helped clients feed their queries into AC, too, but this involves a  
lot of query cleanup, normalization (think N queries that are all unique,  
but really only slightly different), ranking, etc.

## Otis

Search Analytics - [Cloud Monitoring Tools & Services | Sematext](http://sematext.com/search-analytics/index.html)  
Performance Monitoring - [Sematext Monitoring | Infrastructure Monitoring Service](http://sematext.com/spm/index.html)

On Monday, October 8, 2012 12:04:40 PM UTC-4, Benoît wrote:

> Hi,
> 
> I've search the ML about suggest / auto-complete.
> 
> The best way to implement this seems to use a multi-field with an  
> edgeNgram analyzer.  
> Ok. But how do you build the suggested words list ?
> 
> Any tips ?
> 
> Benoît

--

---

<div class="post-metadata">

**Author:** ![Benoit](https://avatars.discourse-cdn.com/v4/letter/b/5daacb/32.png) [@Benoit](https://discuss.elastic.co/u/Benoit)\
**Post date:** [October 9, 2012, 9:51am UTC](https://discuss.elastic.co/t/need-some-tips-on-suggest-autocomplete/9276/5 "2012-10-09T09:51:27Z")

</div>

Hello all,

Thank you for your replies.

I've looked at the "Suggester Plugin for Elasticsearch" but this is not for  
me : big warning "THIS IS NOT PRODUCTION READY! DO NOT USE IT." , plus the  
fact that it need to be rebuild periodically and work at the level of one  
index.

With the edgeNgram field I’ve configured and some tuning of highlighting  
configuration I’m able to retrieve a list of word easily cleanable but the  
problem is that there is many times same word in results.

I will look to implement suggest on my side or with a dedicated index.

Benoît

--

---

<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, 3:09am UTC](https://discuss.elastic.co/t/need-some-tips-on-suggest-autocomplete/9276/6 "2017-07-06T03:09:37Z")

</div>


