# Auto suggestions

**URL:** https://discuss.elastic.co/t/auto-suggestions/5454
**Category:** Elasticsearch
**Created:** [September 26, 2011, 4:22pm UTC](https://discuss.elastic.co/t/auto-suggestions/5454 "2011-09-26T16:22:46Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![arien](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@arien](https://discuss.elastic.co/u/arien)
#### Post date: [September 26, 2011, 4:22pm UTC](https://discuss.elastic.co/t/auto-suggestions/5454/1 "2011-09-26T16:22:46Z")

</div>

Hi all;  
This is more of a logical doubt than considering it as a technical  
problem.I want to implement auto suggestion using values extracted  
from Elastic search index for query string...if is there any possible  
way in which i can implement this feature then please suggest.  
Thanks;  
Arien

---

<div class="post-metadata">

### Author: ![vinhphu1711](https://avatars.discourse-cdn.com/v4/letter/v/a88e4f/32.png) [@vinhphu1711](https://discuss.elastic.co/u/vinhphu1711)
#### Post date: [September 27, 2011, 3:07am UTC](https://discuss.elastic.co/t/auto-suggestions/5454/2 "2011-09-27T03:07:30Z")

</div>

Generally speaking, there're some basic steps you can follow:

1. From the original documents, extract all the "phrases" that you want to  
be suggested words for user when they type query. For example: title can be  
a good candidate. You might also want to extract all entity names,  
questions...
2. Put all the "phrases" into 1 special field (or maybe more than one), and  
define that field as "not\_analyzed" or "keyword".
3. Use facet regex query to get suggested items, given some characters user  
has types.

LTVP

On Tue, Sep 27, 2011 at 12:22 AM, arien [ajaypadvi@gmail.com](mailto:ajaypadvi@gmail.com) wrote:

> Hi all;  
> This is more of a logical doubt than considering it as a technical  
> problem.I want to implement auto suggestion using values extracted  
> from Elastic search index for query string...if is there any possible  
> way in which i can implement this feature then please suggest.  
> Thanks;  
> Arien

--  
Le Truong Vinh Phu

---

<div class="post-metadata">

### Author: ![Karussell1](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@Karussell1](https://discuss.elastic.co/u/Karussell1)
#### Post date: [September 29, 2011, 7:35am UTC](https://discuss.elastic.co/t/auto-suggestions/5454/3 "2011-09-29T07:35:50Z")

</div>

(edge)ngram instead of facet regex should be faster.

On 27 Sep., 05:07, Le Truong Vinh Phu [le.truong.vinh....@gmail.com](mailto:le.truong.vinh....@gmail.com)  
wrote:

> Generally speaking, there're some basic steps you can follow:
> 
> 1. From the original documents, extract all the "phrases" that you want to  
> be suggested words for user when they type query. For example: title can be  
> a good candidate. You might also want to extract all entity names,  
> questions...
> 2. Put all the "phrases" into 1 special field (or maybe more than one), and  
> define that field as "not\_analyzed" or "keyword".
> 3. Use facet regex query to get suggested items, given some characters user  
> has types.
> 
> LTVP
> 
> On Tue, Sep 27, 2011 at 12:22 AM, arien [ajaypa...@gmail.com](mailto:ajaypa...@gmail.com) wrote:
> 
> > Hi all;  
> > This is more of a logical doubt than considering it as a technical  
> > problem.I want to implement auto suggestion using values extracted  
> > from Elastic search index for query string...if is there any possible  
> > way in which i can implement this feature then please suggest.  
> > Thanks;  
> > Arien
> 
> --  
> Le Truong Vinh Phu

---

<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:53am UTC](https://discuss.elastic.co/t/auto-suggestions/5454/4 "2017-07-06T03:53:23Z")

</div>


