# How to use ElasticSearch to implement Autocompleter?

**URL:** https://discuss.elastic.co/t/how-to-use-elasticsearch-to-implement-autocompleter/15299
**Category:** Elasticsearch
**Created:** [January 17, 2014, 4:04pm UTC](https://discuss.elastic.co/t/how-to-use-elasticsearch-to-implement-autocompleter/15299 "2014-01-17T16:04:14Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![dark\_shadow](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dark\_shadow](https://discuss.elastic.co/u/dark_shadow)
#### Post date: [January 17, 2014, 4:04pm UTC](https://discuss.elastic.co/t/how-to-use-elasticsearch-to-implement-autocompleter/15299/1 "2014-01-17T16:04:14Z")

</div>

Hi,

I'm trying to use elasticsearch to implement a autocompleter for my  
college project just like some travel websites use it for implementing  
their autocompleter but facing some issues in implementation.

I'm using following mapping for my case:-

curl -XPUT '[http://localhost:9200/auto\_index/](http://localhost:9200/auto_index/)[http://localhost:9200/acqindex/](http://localhost:9200/acqindex/)'  
-d '{  
"settings" : {  
"index" : {  
"number\_of\_shards" : 1,  
"number\_of\_replicas" : 1,  
"analysis" : {  
"analyzer" : {  
"str\_search\_analyzer" : {  
"tokenizer" : "standard",  
"filter" : ["lowercase","asciifolding","  
suggestion\_shingle","edgengram"]  
},  
"str\_index\_analyzer" : {  
"tokenizer" : "standard",  
"filter" :  
["lowercase","asciifolding","suggestions\_shingle","edgengram"]  
}  
},  
"filter" : {  
"suggestions\_shingle": {  
"type": "shingle",  
"min\_shingle\_size": 2,  
"max\_shingle\_size": 5  
},  
"edgengram" : {  
"type" : "edgeNGram",  
"min\_gram" : 2,  
"max\_gram" : 30,  
"side" : "front"  
},  
"mynGram" : {  
"type" : "nGram",  
"min\_gram" : 2,  
"max\_gram" : 30  
}  
}  
},  
"similarity" : {  
"index": {  
"type":  
"org.elasticsearch.index.similarity.CustomSimilarityProvider"  
},  
"search": {  
"type":  
"org.elasticsearch.index.similarity.CustomSimilarityProvider"  
}  
}  
}  
}

curl -XPUT 'localhost:9200/auto\_index/autocomplete/\_mapping' -d '{  
"autocomplete":{  
"\_boost" : {  
"name" : "po",  
"null\_value" : 4.0  
},  
"properties": {  
"ad": {  
"type": "string",  
"search\_analyzer" : "str\_search\_analyzer",  
"index\_analyzer" : "str\_index\_analyzer",  
"omit\_norms": "true",  
"similarity": "index"  
},  
"category": {  
"type": "string",  
"include\_in\_all" : false  
},  
"cn": {  
"type": "string",  
"search\_analyzer" : "str\_search\_analyzer",  
"index\_analyzer" : "str\_index\_analyzer",  
"omit\_norms": "true",  
"similarity": "index"  
},  
"ctype": {  
"type": "string",  
"search\_analyzer" : "keyword",  
"index\_analyzer" : "keyword",  
"omit\_norms": "true",  
"similarity": "index"  
},  
"eid": {  
"type": "string",  
"include\_in\_all" : false  
},  
"st": {  
"type": "string",  
"search\_analyzer" : "str\_search\_analyzer",  
"index\_analyzer" : "str\_index\_analyzer",  
"omit\_norms": "true",  
"similarity": "index"  
},  
"co": {  
"type": "string",  
"include\_in\_all" : false  
},  
"st": {  
"type": "string",  
"search\_analyzer" : "str\_search\_analyzer",  
"index\_analyzer" : "str\_index\_analyzer",  
"omit\_norms": "true",  
"similarity": "index"  
},  
"co": {  
"type": "string",  
"search\_analyzer" : "str\_search\_analyzer",  
"index\_analyzer" : "str\_index\_analyzer",  
"omit\_norms": "true",  
"similarity": "index"  
},  
"po": {  
"type": "double",  
"boost": 4.0  
},  
"en":{  
"type": "boolean"  
},  
"\_oid":{  
"type": "long"  
},  
"text": {  
"type": "string",  
"search\_analyzer" : "str\_search\_analyzer",  
"index\_analyzer" : "str\_index\_analyzer",  
"omit\_norms": "true",  
"similarity": "index"  
},  
"url": {  
"type": "string"  
}  
}  
}  
}'

and then in my java code, i'm forming query like:-

String script = "\_score \* (doc['po'].empty ? 1 : doc['po'].value == 0.0 ? 1  
: doc['po'].value)";  
QueryBuilder queryBuilder = QueryBuilders.customScoreQuery(  
QueryBuilders.queryString(query)  
.field("text",30)  
.field("ad")  
.field("st")  
.field("cn")  
.field("co")

.defaultOperator(Operator.AND)).script(script);

Some explanation of fields:  
text: contains statements like "things to do in goa"  
ad: address  
st: state  
cn: city name  
co: country

Now, if I type "things to do in" in my autocompleter box, i'm getting  
these results:

things to do in rann  
things to do in bulandshahr  
things to do in gondai  
things to do in rewa  
things to do in goa

But I want "things to do in goa" on top.

Earlier, I thought idf in Elasticsearch is creating problem, So I override  
the Default similarity and created CustomSimilarity which sets idf to 1.  
But it's still not solving not my problem. Instead it started giving me  
results like this:

things to do in toronto on top.

I think may be I'm doing something wrong in my index\_analyzer and  
search\_analyzer. I tried other tokenizers and token filters in different  
order but not able to get any solution.

I could have implemented simple prefix autocompleter but that way it  
doesn't make any sense to use Elasticsearch since searching for terms in  
between sentences gives user more flexibility. Also, in travel industry a  
person can search for a particular thing in different manners. like instead  
of searching for exactly "things to do in" he/she can also wrote "what are  
the best things to do in" or "what are things to do" and many other  
possibilities. That way a prefix autocompleter won't work effectively.  
That's why I tried implementing autocompleter using ElasticSearch but I'm  
not doing it right way.

For better results, I also introduced a popularity factor which keeps  
updating on every user click so that its score keeps increasing in every  
search using custom score query. Also, giving text field 30% weightage and  
lesser weightage to other fields. But something is not going right.

I guess I'm not able to use ElasticSearch capabilities properly for my use  
case. Can you please help me with this ?

Thanks

--  
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/39ce69bc-e2b8-4c27-9240-d6dbcc5a0656%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/39ce69bc-e2b8-4c27-9240-d6dbcc5a0656%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![joa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joa/32/1807_2.png) [@joa](https://discuss.elastic.co/u/joa)
#### Post date: [January 17, 2014, 4:11pm UTC](https://discuss.elastic.co/t/how-to-use-elasticsearch-to-implement-autocompleter/15299/2 "2014-01-17T16:11:57Z")

</div>

You should look at the the completion suggester added in 0.90.30 instead of  
using edgengrams.

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

On Friday, January 17, 2014 5:04:14 PM UTC+1, coder wrote:

> Hi,
> 
> I'm trying to use elasticsearch to implement a autocompleter for my  
> college project just like some travel websites use it for implementing  
> their autocompleter but facing some issues in implementation.
> 
> I'm using following mapping for my case:-
> 
> curl -XPUT '[http://localhost:9200/auto\_index/](http://localhost:9200/auto_index/)[http://localhost:9200/acqindex/](http://localhost:9200/acqindex/)'  
> -d '{  
> "settings" : {  
> "index" : {  
> "number\_of\_shards" : 1,  
> "number\_of\_replicas" : 1,  
> "analysis" : {  
> "analyzer" : {  
> "str\_search\_analyzer" : {  
> "tokenizer" : "standard",  
> "filter" : ["lowercase","asciifolding","  
> suggestion\_shingle","edgengram"]  
> },  
> "str\_index\_analyzer" : {  
> "tokenizer" : "standard",  
> "filter" :  
> ["lowercase","asciifolding","suggestions\_shingle","edgengram"]  
> }  
> },  
> "filter" : {  
> "suggestions\_shingle": {  
> "type": "shingle",  
> "min\_shingle\_size": 2,  
> "max\_shingle\_size": 5  
> },  
> "edgengram" : {  
> "type" : "edgeNGram",  
> "min\_gram" : 2,  
> "max\_gram" : 30,  
> "side" : "front"  
> },  
> "mynGram" : {  
> "type" : "nGram",  
> "min\_gram" : 2,  
> "max\_gram" : 30  
> }  
> }  
> },  
> "similarity" : {  
> "index": {  
> "type":  
> "org.elasticsearch.index.similarity.CustomSimilarityProvider"  
> },  
> "search": {  
> "type":  
> "org.elasticsearch.index.similarity.CustomSimilarityProvider"  
> }  
> }  
> }  
> }
> 
> curl -XPUT 'localhost:9200/auto\_index/autocomplete/\_mapping' -d '{  
> "autocomplete":{  
> "\_boost" : {  
> "name" : "po",  
> "null\_value" : 4.0  
> },  
> "properties": {  
> "ad": {  
> "type": "string",  
> "search\_analyzer" : "str\_search\_analyzer",  
> "index\_analyzer" : "str\_index\_analyzer",  
> "omit\_norms": "true",  
> "similarity": "index"  
> },  
> "category": {  
> "type": "string",  
> "include\_in\_all" : false  
> },  
> "cn": {  
> "type": "string",  
> "search\_analyzer" : "str\_search\_analyzer",  
> "index\_analyzer" : "str\_index\_analyzer",  
> "omit\_norms": "true",  
> "similarity": "index"  
> },  
> "ctype": {  
> "type": "string",  
> "search\_analyzer" : "keyword",  
> "index\_analyzer" : "keyword",  
> "omit\_norms": "true",  
> "similarity": "index"  
> },  
> "eid": {  
> "type": "string",  
> "include\_in\_all" : false  
> },  
> "st": {  
> "type": "string",  
> "search\_analyzer" : "str\_search\_analyzer",  
> "index\_analyzer" : "str\_index\_analyzer",  
> "omit\_norms": "true",  
> "similarity": "index"  
> },  
> "co": {  
> "type": "string",  
> "include\_in\_all" : false  
> },  
> "st": {  
> "type": "string",  
> "search\_analyzer" : "str\_search\_analyzer",  
> "index\_analyzer" : "str\_index\_analyzer",  
> "omit\_norms": "true",  
> "similarity": "index"  
> },  
> "co": {  
> "type": "string",  
> "search\_analyzer" : "str\_search\_analyzer",  
> "index\_analyzer" : "str\_index\_analyzer",  
> "omit\_norms": "true",  
> "similarity": "index"  
> },  
> "po": {  
> "type": "double",  
> "boost": 4.0  
> },  
> "en":{  
> "type": "boolean"  
> },  
> "\_oid":{  
> "type": "long"  
> },  
> "text": {  
> "type": "string",  
> "search\_analyzer" : "str\_search\_analyzer",  
> "index\_analyzer" : "str\_index\_analyzer",  
> "omit\_norms": "true",  
> "similarity": "index"  
> },  
> "url": {  
> "type": "string"  
> }  
> }  
> }  
> }'
> 
> and then in my java code, i'm forming query like:-
> 
> String script = "\_score \* (doc['po'].empty ? 1 : doc['po'].value == 0.0 ?  
> 1 : doc['po'].value)";  
> QueryBuilder queryBuilder = QueryBuilders.customScoreQuery(  
> QueryBuilders.queryString(query)  
> .field("text",30)  
> .field("ad")  
> .field("st")  
> .field("cn")  
> .field("co")
> 
> .defaultOperator(Operator.AND)).script(script);
> 
> Some explanation of fields:  
> text: contains statements like "things to do in goa"  
> ad: address  
> st: state  
> cn: city name  
> co: country
> 
> Now, if I type "things to do in" in my autocompleter box, i'm getting  
> these results:
> 
> things to do in rann  
> things to do in bulandshahr  
> things to do in gondai  
> things to do in rewa  
> things to do in goa
> 
> But I want "things to do in goa" on top.
> 
> Earlier, I thought idf in Elasticsearch is creating problem, So I override  
> the Default similarity and created CustomSimilarity which sets idf to 1.  
> But it's still not solving not my problem. Instead it started giving me  
> results like this:
> 
> things to do in toronto on top.
> 
> I think may be I'm doing something wrong in my index\_analyzer and  
> search\_analyzer. I tried other tokenizers and token filters in different  
> order but not able to get any solution.
> 
> I could have implemented simple prefix autocompleter but that way it  
> doesn't make any sense to use Elasticsearch since searching for terms in  
> between sentences gives user more flexibility. Also, in travel industry a  
> person can search for a particular thing in different manners. like instead  
> of searching for exactly "things to do in" he/she can also wrote "what are  
> the best things to do in" or "what are things to do" and many other  
> possibilities. That way a prefix autocompleter won't work effectively.  
> That's why I tried implementing autocompleter using Elasticsearch but I'm  
> not doing it right way.
> 
> For better results, I also introduced a popularity factor which keeps  
> updating on every user click so that its score keeps increasing in every  
> search using custom score query. Also, giving text field 30% weightage and  
> lesser weightage to other fields. But something is not going right.
> 
> I guess I'm not able to use Elasticsearch capabilities properly for my use  
> case. Can you please help me with this ?
> 
> Thanks

--  
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/3fb42188-c58a-4ab0-bcb8-48c1b075eb71%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3fb42188-c58a-4ab0-bcb8-48c1b075eb71%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![dark\_shadow](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dark\_shadow](https://discuss.elastic.co/u/dark_shadow)
#### Post date: [January 17, 2014, 4:20pm UTC](https://discuss.elastic.co/t/how-to-use-elasticsearch-to-implement-autocompleter/15299/3 "2014-01-17T16:20:36Z")

</div>

But the problem still remains. The completion suggester will give you  
results only if there is an exact match but as previously mentioned there  
can be many types of queries which can be done by a user at travel website.

Thanks

On Fri, Jan 17, 2014 at 9:41 PM, joa [joafeldmann@gmail.com](mailto:joafeldmann@gmail.com) wrote:

> You should look at the the completion suggester added in 0.90.30 instead  
> of using edgengrams.
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-suggesters-completion.html)  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/blog/you-complete-me/)
> 
> On Friday, January 17, 2014 5:04:14 PM UTC+1, coder wrote:
> 
> > Hi,
> > 
> > I'm trying to use elasticsearch to implement a autocompleter for my  
> > college project just like some travel websites use it for implementing  
> > their autocompleter but facing some issues in implementation.
> > 
> > I'm using following mapping for my case:-
> > 
> > curl -XPUT '[http://localhost:9200/auto\_index/](http://localhost:9200/auto_index/)[http://localhost:9200/acqindex/](http://localhost:9200/acqindex/)'  
> > -d '{  
> > "settings" : {  
> > "index" : {  
> > "number\_of\_shards" : 1,  
> > "number\_of\_replicas" : 1,  
> > "analysis" : {  
> > "analyzer" : {  
> > "str\_search\_analyzer" : {  
> > "tokenizer" : "standard",  
> > "filter" : ["lowercase","asciifolding","  
> > suggestion\_shingle","edgengram"]  
> > },  
> > "str\_index\_analyzer" : {  
> > "tokenizer" : "standard",  
> > "filter" : ["lowercase","asciifolding","  
> > suggestions\_shingle","edgengram"]  
> > }  
> > },  
> > "filter" : {  
> > "suggestions\_shingle": {  
> > "type": "shingle",  
> > "min\_shingle\_size": 2,  
> > "max\_shingle\_size": 5  
> > },  
> > "edgengram" : {  
> > "type" : "edgeNGram",  
> > "min\_gram" : 2,  
> > "max\_gram" : 30,  
> > "side" : "front"  
> > },  
> > "mynGram" : {  
> > "type" : "nGram",  
> > "min\_gram" : 2,  
> > "max\_gram" : 30  
> > }  
> > }  
> > },  
> > "similarity" : {  
> > "index": {  
> > "type": "org.elasticsearch.index.similarity.  
> > CustomSimilarityProvider"  
> > },  
> > "search": {  
> > "type": "org.elasticsearch.index.similarity.  
> > CustomSimilarityProvider"  
> > }  
> > }  
> > }  
> > }
> > 
> > curl -XPUT 'localhost:9200/auto\_index/autocomplete/\_mapping' -d '{  
> > "autocomplete":{  
> > "\_boost" : {  
> > "name" : "po",  
> > "null\_value" : 4.0  
> > },  
> > "properties": {  
> > "ad": {  
> > "type": "string",  
> > "search\_analyzer" : "str\_search\_analyzer",  
> > "index\_analyzer" : "str\_index\_analyzer",  
> > "omit\_norms": "true",  
> > "similarity": "index"  
> > },  
> > "category": {  
> > "type": "string",  
> > "include\_in\_all" : false  
> > },  
> > "cn": {  
> > "type": "string",  
> > "search\_analyzer" : "str\_search\_analyzer",  
> > "index\_analyzer" : "str\_index\_analyzer",  
> > "omit\_norms": "true",  
> > "similarity": "index"  
> > },  
> > "ctype": {  
> > "type": "string",  
> > "search\_analyzer" : "keyword",  
> > "index\_analyzer" : "keyword",  
> > "omit\_norms": "true",  
> > "similarity": "index"  
> > },  
> > "eid": {  
> > "type": "string",  
> > "include\_in\_all" : false  
> > },  
> > "st": {  
> > "type": "string",  
> > "search\_analyzer" : "str\_search\_analyzer",  
> > "index\_analyzer" : "str\_index\_analyzer",  
> > "omit\_norms": "true",  
> > "similarity": "index"  
> > },  
> > "co": {  
> > "type": "string",  
> > "include\_in\_all" : false  
> > },  
> > "st": {  
> > "type": "string",  
> > "search\_analyzer" : "str\_search\_analyzer",  
> > "index\_analyzer" : "str\_index\_analyzer",  
> > "omit\_norms": "true",  
> > "similarity": "index"  
> > },  
> > "co": {  
> > "type": "string",  
> > "search\_analyzer" : "str\_search\_analyzer",  
> > "index\_analyzer" : "str\_index\_analyzer",  
> > "omit\_norms": "true",  
> > "similarity": "index"  
> > },  
> > "po": {  
> > "type": "double",  
> > "boost": 4.0  
> > },  
> > "en":{  
> > "type": "boolean"  
> > },  
> > "\_oid":{  
> > "type": "long"  
> > },  
> > "text": {  
> > "type": "string",  
> > "search\_analyzer" : "str\_search\_analyzer",  
> > "index\_analyzer" : "str\_index\_analyzer",  
> > "omit\_norms": "true",  
> > "similarity": "index"  
> > },  
> > "url": {  
> > "type": "string"  
> > }  
> > }  
> > }  
> > }'
> > 
> > and then in my java code, i'm forming query like:-
> > 
> > String script = "\_score \* (doc['po'].empty ? 1 : doc['po'].value == 0.0 ?  
> > 1 : doc['po'].value)";  
> > QueryBuilder queryBuilder = QueryBuilders.customScoreQuery(  
> > QueryBuilders.queryString(query)  
> > .field("text",30)  
> > .field("ad")  
> > .field("st")  
> > .field("cn")  
> > .field("co")  
> > .defaultOperator(Operator.AND)  
> > ).script(script);
> > 
> > Some explanation of fields:  
> > text: contains statements like "things to do in goa"  
> > ad: address  
> > st: state  
> > cn: city name  
> > co: country
> > 
> > Now, if I type "things to do in" in my autocompleter box, i'm getting  
> > these results:
> > 
> > things to do in rann  
> > things to do in bulandshahr  
> > things to do in gondai  
> > things to do in rewa  
> > things to do in goa
> > 
> > But I want "things to do in goa" on top.
> > 
> > Earlier, I thought idf in Elasticsearch is creating problem, So I  
> > override the Default similarity and created CustomSimilarity which sets idf  
> > to 1. But it's still not solving not my problem. Instead it started giving  
> > me results like this:
> > 
> > things to do in toronto on top.
> > 
> > I think may be I'm doing something wrong in my index\_analyzer and  
> > search\_analyzer. I tried other tokenizers and token filters in different  
> > order but not able to get any solution.
> > 
> > I could have implemented simple prefix autocompleter but that way it  
> > doesn't make any sense to use Elasticsearch since searching for terms in  
> > between sentences gives user more flexibility. Also, in travel industry a  
> > person can search for a particular thing in different manners. like instead  
> > of searching for exactly "things to do in" he/she can also wrote "what are  
> > the best things to do in" or "what are things to do" and many other  
> > possibilities. That way a prefix autocompleter won't work effectively.  
> > That's why I tried implementing autocompleter using Elasticsearch but I'm  
> > not doing it right way.
> > 
> > For better results, I also introduced a popularity factor which keeps  
> > updating on every user click so that its score keeps increasing in every  
> > search using custom score query. Also, giving text field 30% weightage and  
> > lesser weightage to other fields. But something is not going right.
> > 
> > I guess I'm not able to use Elasticsearch capabilities properly for my  
> > use case. Can you please help me with this ?
> > 
> > Thanks
> 
> --  
> 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/3fb42188-c58a-4ab0-bcb8-48c1b075eb71%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3fb42188-c58a-4ab0-bcb8-48c1b075eb71%40googlegroups.com)  
> .
> 
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/CAAVTvp5LwHRzvMgL2iDKLK4m002oCic%2BZZ4%2B4VoG1HPzRaOeog%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAAVTvp5LwHRzvMgL2iDKLK4m002oCic%2BZZ4%2B4VoG1HPzRaOeog%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![joa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joa/32/1807_2.png) [@joa](https://discuss.elastic.co/u/joa)
#### Post date: [January 17, 2014, 4:34pm UTC](https://discuss.elastic.co/t/how-to-use-elasticsearch-to-implement-autocompleter/15299/4 "2014-01-17T16:34:14Z")

</div>

You can index a term in mutliple ways with the suggestion completer. See (  
[Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/blog/you-complete-me/)[http://www.google.com/url?q=http%3A%2F%2Fwww.elasticsearch.org%2Fblog%2Fyou-complete-me%2F&sa=D&sntz=1&usg=AFQjCNE7l1bQE4K3E-uZpWW1Las-1VRrQA](http://www.google.com/url?q=http%3A%2F%2Fwww.elasticsearch.org%2Fblog%2Fyou-complete-me%2F&sa=D&sntz=1&usg=AFQjCNE7l1bQE4K3E-uZpWW1Las-1VRrQA)),  
they are showing hotel bookings as use case!  
curl -X PUT localhost:9200/hotels/hotel/1 -d '  
{  
"name" : "Mercure Hotel Munich",  
"city" : "Munich",  
"name\_suggest" : {  
"input" : [  
"Mercure Hotel Munich",  
"Mercure Munich",  
"ADD OTHER WORD COMBINATIONS HERE..."  
]  
}  
}'

If you mean by exact matches you also want fuzzy suggests (e.g. suggest  
even with misspelling) you can set the the fuzzy param:

curl -X POST 'localhost:9200/music/\_suggest?pretty' -d '{  
"song-suggest" : {  
"text" : "n",  
"completion" : {  
"field" : "suggest",  
"fuzzy" : {  
"edit\_distance" : 2  
}  
}  
}  
}'

On Friday, January 17, 2014 5:20:36 PM UTC+1, coder wrote:

> But the problem still remains. The completion suggester will give you  
> results only if there is an exact match but as previously mentioned there  
> can be many types of queries which can be done by a user at travel website.
> 
> Thanks
> 
> On Fri, Jan 17, 2014 at 9:41 PM, joa \<[joafe...@gmail.com](mailto:joafe...@gmail.com) \<javascript:\>\>wrote:
> 
> > You should look at the the completion suggester added in 0.90.30 instead  
> > of using edgengrams.
> > 
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-suggesters-completion.html)  
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/blog/you-complete-me/)
> > 
> > On Friday, January 17, 2014 5:04:14 PM UTC+1, coder wrote:
> > 
> > > Hi,
> > > 
> > > I'm trying to use elasticsearch to implement a autocompleter for my  
> > > college project just like some travel websites use it for implementing  
> > > their autocompleter but facing some issues in implementation.
> > > 
> > > I'm using following mapping for my case:-
> > > 
> > > curl -XPUT '[http://localhost:9200/auto\_index/](http://localhost:9200/auto_index/)[http://localhost:9200/acqindex/](http://localhost:9200/acqindex/)'  
> > > -d '{  
> > > "settings" : {  
> > > "index" : {  
> > > "number\_of\_shards" : 1,  
> > > "number\_of\_replicas" : 1,  
> > > "analysis" : {  
> > > "analyzer" : {  
> > > "str\_search\_analyzer" : {  
> > > "tokenizer" : "standard",  
> > > "filter" : ["lowercase","asciifolding","  
> > > suggestion\_shingle","edgengram"]  
> > > },  
> > > "str\_index\_analyzer" : {  
> > > "tokenizer" : "standard",  
> > > "filter" : ["lowercase","asciifolding","  
> > > suggestions\_shingle","edgengram"]  
> > > }  
> > > },  
> > > "filter" : {  
> > > "suggestions\_shingle": {  
> > > "type": "shingle",  
> > > "min\_shingle\_size": 2,  
> > > "max\_shingle\_size": 5  
> > > },  
> > > "edgengram" : {  
> > > "type" : "edgeNGram",  
> > > "min\_gram" : 2,  
> > > "max\_gram" : 30,  
> > > "side" : "front"  
> > > },  
> > > "mynGram" : {  
> > > "type" : "nGram",  
> > > "min\_gram" : 2,  
> > > "max\_gram" : 30  
> > > }  
> > > }  
> > > },  
> > > "similarity" : {  
> > > "index": {  
> > > "type": "org.elasticsearch.index.  
> > > similarity.CustomSimilarityProvider"  
> > > },  
> > > "search": {  
> > > "type": "org.elasticsearch.index.  
> > > similarity.CustomSimilarityProvider"  
> > > }  
> > > }  
> > > }  
> > > }
> > > 
> > > curl -XPUT 'localhost:9200/auto\_index/autocomplete/\_mapping' -d '{  
> > > "autocomplete":{  
> > > "\_boost" : {  
> > > "name" : "po",  
> > > "null\_value" : 4.0  
> > > },  
> > > "properties": {  
> > > "ad": {  
> > > "type": "string",  
> > > "search\_analyzer" : "str\_search\_analyzer",  
> > > "index\_analyzer" : "str\_index\_analyzer",  
> > > "omit\_norms": "true",  
> > > "similarity": "index"  
> > > },  
> > > "category": {  
> > > "type": "string",  
> > > "include\_in\_all" : false  
> > > },  
> > > "cn": {  
> > > "type": "string",  
> > > "search\_analyzer" : "str\_search\_analyzer",  
> > > "index\_analyzer" : "str\_index\_analyzer",  
> > > "omit\_norms": "true",  
> > > "similarity": "index"  
> > > },  
> > > "ctype": {  
> > > "type": "string",  
> > > "search\_analyzer" : "keyword",  
> > > "index\_analyzer" : "keyword",  
> > > "omit\_norms": "true",  
> > > "similarity": "index"  
> > > },  
> > > "eid": {  
> > > "type": "string",  
> > > "include\_in\_all" : false  
> > > },  
> > > "st": {  
> > > "type": "string",  
> > > "search\_analyzer" : "str\_search\_analyzer",  
> > > "index\_analyzer" : "str\_index\_analyzer",  
> > > "omit\_norms": "true",  
> > > "similarity": "index"  
> > > },  
> > > "co": {  
> > > "type": "string",  
> > > "include\_in\_all" : false  
> > > },  
> > > "st": {  
> > > "type": "string",  
> > > "search\_analyzer" : "str\_search\_analyzer",  
> > > "index\_analyzer" : "str\_index\_analyzer",  
> > > "omit\_norms": "true",  
> > > "similarity": "index"  
> > > },  
> > > "co": {  
> > > "type": "string",  
> > > "search\_analyzer" : "str\_search\_analyzer",  
> > > "index\_analyzer" : "str\_index\_analyzer",  
> > > "omit\_norms": "true",  
> > > "similarity": "index"  
> > > },  
> > > "po": {  
> > > "type": "double",  
> > > "boost": 4.0  
> > > },  
> > > "en":{  
> > > "type": "boolean"  
> > > },  
> > > "\_oid":{  
> > > "type": "long"  
> > > },  
> > > "text": {  
> > > "type": "string",  
> > > "search\_analyzer" : "str\_search\_analyzer",  
> > > "index\_analyzer" : "str\_index\_analyzer",  
> > > "omit\_norms": "true",  
> > > "similarity": "index"  
> > > },  
> > > "url": {  
> > > "type": "string"  
> > > }  
> > > }  
> > > }  
> > > }'
> > > 
> > > and then in my java code, i'm forming query like:-
> > > 
> > > String script = "\_score \* (doc['po'].empty ? 1 : doc['po'].value == 0.0  
> > > ? 1 : doc['po'].value)";  
> > > QueryBuilder queryBuilder = QueryBuilders.customScoreQuery(  
> > > QueryBuilders.queryString(query)  
> > > .field("text",30)  
> > > .field("ad")  
> > > .field("st")  
> > > .field("cn")  
> > > .field("co")
> > > 
> > > .defaultOperator(Operator.AND)).script(script);
> > > 
> > > Some explanation of fields:  
> > > text: contains statements like "things to do in goa"  
> > > ad: address  
> > > st: state  
> > > cn: city name  
> > > co: country
> > > 
> > > Now, if I type "things to do in" in my autocompleter box, i'm getting  
> > > these results:
> > > 
> > > things to do in rann  
> > > things to do in bulandshahr  
> > > things to do in gondai  
> > > things to do in rewa  
> > > things to do in goa
> > > 
> > > But I want "things to do in goa" on top.
> > > 
> > > Earlier, I thought idf in Elasticsearch is creating problem, So I  
> > > override the Default similarity and created CustomSimilarity which sets idf  
> > > to 1. But it's still not solving not my problem. Instead it started giving  
> > > me results like this:
> > > 
> > > things to do in toronto on top.
> > > 
> > > I think may be I'm doing something wrong in my index\_analyzer and  
> > > search\_analyzer. I tried other tokenizers and token filters in different  
> > > order but not able to get any solution.
> > > 
> > > I could have implemented simple prefix autocompleter but that way it  
> > > doesn't make any sense to use Elasticsearch since searching for terms in  
> > > between sentences gives user more flexibility. Also, in travel industry a  
> > > person can search for a particular thing in different manners. like instead  
> > > of searching for exactly "things to do in" he/she can also wrote "what are  
> > > the best things to do in" or "what are things to do" and many other  
> > > possibilities. That way a prefix autocompleter won't work effectively.  
> > > That's why I tried implementing autocompleter using Elasticsearch but I'm  
> > > not doing it right way.
> > > 
> > > For better results, I also introduced a popularity factor which keeps  
> > > updating on every user click so that its score keeps increasing in every  
> > > search using custom score query. Also, giving text field 30% weightage and  
> > > lesser weightage to other fields. But something is not going right.
> > > 
> > > I guess I'm not able to use Elasticsearch capabilities properly for my  
> > > use case. Can you please help me with this ?
> > > 
> > > Thanks
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/3fb42188-c58a-4ab0-bcb8-48c1b075eb71%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3fb42188-c58a-4ab0-bcb8-48c1b075eb71%40googlegroups.com)  
> > .
> > 
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/d060acb6-eb00-4a35-b707-7d626844f220%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d060acb6-eb00-4a35-b707-7d626844f220%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![dark\_shadow](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dark\_shadow](https://discuss.elastic.co/u/dark_shadow)
#### Post date: [January 17, 2014, 4:40pm UTC](https://discuss.elastic.co/t/how-to-use-elasticsearch-to-implement-autocompleter/15299/5 "2014-01-17T16:40:57Z")

</div>

yeah...that's what I'm saying. I'll have to give all the possible  
combinations in input field. Fuzzy logic is fine but giving all possible  
combinations is not practically possible.

On Fri, Jan 17, 2014 at 10:04 PM, joa [joafeldmann@gmail.com](mailto:joafeldmann@gmail.com) wrote:

> You can index a term in mutliple ways with the suggestion completer. See (  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/blog/you-complete-me/)[http://www.google.com/url?q=http%3A%2F%2Fwww.elasticsearch.org%2Fblog%2Fyou-complete-me%2F&sa=D&sntz=1&usg=AFQjCNE7l1bQE4K3E-uZpWW1Las-1VRrQA](http://www.google.com/url?q=http%3A%2F%2Fwww.elasticsearch.org%2Fblog%2Fyou-complete-me%2F&sa=D&sntz=1&usg=AFQjCNE7l1bQE4K3E-uZpWW1Las-1VRrQA)),  
> they are showing hotel bookings as use case!  
> curl -X PUT localhost:9200/hotels/hotel/1 -d '  
> {  
> "name" : "Mercure Hotel Munich",  
> "city" : "Munich",  
> "name\_suggest" : {  
> "input" : [  
> "Mercure Hotel Munich",  
> "Mercure Munich",  
> "ADD OTHER WORD COMBINATIONS HERE..."  
> ]  
> }  
> }'
> 
> If you mean by exact matches you also want fuzzy suggests (e.g. suggest  
> even with misspelling) you can set the the fuzzy param:
> 
> curl -X POST 'localhost:9200/music/\_suggest?pretty' -d '{  
> "song-suggest" : {  
> "text" : "n",  
> "completion" : {  
> "field" : "suggest",  
> "fuzzy" : {  
> "edit\_distance" : 2  
> }  
> }  
> }  
> }'
> 
> On Friday, January 17, 2014 5:20:36 PM UTC+1, coder wrote:
> 
> > But the problem still remains. The completion suggester will give you  
> > results only if there is an exact match but as previously mentioned there  
> > can be many types of queries which can be done by a user at travel website.
> > 
> > Thanks
> > 
> > On Fri, Jan 17, 2014 at 9:41 PM, joa [joafe...@gmail.com](mailto:joafe...@gmail.com) wrote:
> > 
> > > You should look at the the completion suggester added in 0.90.30 instead  
> > > of using edgengrams.  
> > > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/)  
> > > reference/current/search-suggesters-completion.html  
> > > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/blog/you-complete-me/)
> > > 
> > > On Friday, January 17, 2014 5:04:14 PM UTC+1, coder wrote:
> > > 
> > > > Hi,
> > > > 
> > > > I'm trying to use elasticsearch to implement a autocompleter for my  
> > > > college project just like some travel websites use it for implementing  
> > > > their autocompleter but facing some issues in implementation.
> > > > 
> > > > I'm using following mapping for my case:-
> > > > 
> > > > curl -XPUT '[http://localhost:9200/auto\_index/](http://localhost:9200/auto_index/)[http://localhost:9200/acqindex/](http://localhost:9200/acqindex/)'  
> > > > -d '{  
> > > > "settings" : {  
> > > > "index" : {  
> > > > "number\_of\_shards" : 1,  
> > > > "number\_of\_replicas" : 1,  
> > > > "analysis" : {  
> > > > "analyzer" : {  
> > > > "str\_search\_analyzer" : {  
> > > > "tokenizer" : "standard",  
> > > > "filter" : ["lowercase","asciifolding","  
> > > > suggestion\_shingle","edgengram"]  
> > > > },  
> > > > "str\_index\_analyzer" : {  
> > > > "tokenizer" : "standard",  
> > > > "filter" : ["lowercase","asciifolding","s  
> > > > uggestions\_shingle","edgengram"]  
> > > > }  
> > > > },  
> > > > "filter" : {  
> > > > "suggestions\_shingle": {  
> > > > "type": "shingle",  
> > > > "min\_shingle\_size": 2,  
> > > > "max\_shingle\_size": 5  
> > > > },  
> > > > "edgengram" : {  
> > > > "type" : "edgeNGram",  
> > > > "min\_gram" : 2,  
> > > > "max\_gram" : 30,  
> > > > "side" : "front"  
> > > > },  
> > > > "mynGram" : {  
> > > > "type" : "nGram",  
> > > > "min\_gram" : 2,  
> > > > "max\_gram" : 30  
> > > > }  
> > > > }  
> > > > },  
> > > > "similarity" : {  
> > > > "index": {  
> > > > "type": "org.elasticsearch.index.simil  
> > > > arity.CustomSimilarityProvider"  
> > > > },  
> > > > "search": {  
> > > > "type": "org.elasticsearch.index.simil  
> > > > arity.CustomSimilarityProvider"  
> > > > }  
> > > > }  
> > > > }  
> > > > }
> > > > 
> > > > curl -XPUT 'localhost:9200/auto\_index/autocomplete/\_mapping' -d '{  
> > > > "autocomplete":{  
> > > > "\_boost" : {  
> > > > "name" : "po",  
> > > > "null\_value" : 4.0  
> > > > },  
> > > > "properties": {  
> > > > "ad": {  
> > > > "type": "string",  
> > > > "search\_analyzer" : "str\_search\_analyzer",  
> > > > "index\_analyzer" : "str\_index\_analyzer",  
> > > > "omit\_norms": "true",  
> > > > "similarity": "index"  
> > > > },  
> > > > "category": {  
> > > > "type": "string",  
> > > > "include\_in\_all" : false  
> > > > },  
> > > > "cn": {  
> > > > "type": "string",  
> > > > "search\_analyzer" : "str\_search\_analyzer",  
> > > > "index\_analyzer" : "str\_index\_analyzer",  
> > > > "omit\_norms": "true",  
> > > > "similarity": "index"  
> > > > },  
> > > > "ctype": {  
> > > > "type": "string",  
> > > > "search\_analyzer" : "keyword",  
> > > > "index\_analyzer" : "keyword",  
> > > > "omit\_norms": "true",  
> > > > "similarity": "index"  
> > > > },  
> > > > "eid": {  
> > > > "type": "string",  
> > > > "include\_in\_all" : false  
> > > > },  
> > > > "st": {  
> > > > "type": "string",  
> > > > "search\_analyzer" : "str\_search\_analyzer",  
> > > > "index\_analyzer" : "str\_index\_analyzer",  
> > > > "omit\_norms": "true",  
> > > > "similarity": "index"  
> > > > },  
> > > > "co": {  
> > > > "type": "string",  
> > > > "include\_in\_all" : false  
> > > > },  
> > > > "st": {  
> > > > "type": "string",  
> > > > "search\_analyzer" : "str\_search\_analyzer",  
> > > > "index\_analyzer" : "str\_index\_analyzer",  
> > > > "omit\_norms": "true",  
> > > > "similarity": "index"  
> > > > },  
> > > > "co": {  
> > > > "type": "string",  
> > > > "search\_analyzer" : "str\_search\_analyzer",  
> > > > "index\_analyzer" : "str\_index\_analyzer",  
> > > > "omit\_norms": "true",  
> > > > "similarity": "index"  
> > > > },  
> > > > "po": {  
> > > > "type": "double",  
> > > > "boost": 4.0  
> > > > },  
> > > > "en":{  
> > > > "type": "boolean"  
> > > > },  
> > > > "\_oid":{  
> > > > "type": "long"  
> > > > },  
> > > > "text": {  
> > > > "type": "string",  
> > > > "search\_analyzer" : "str\_search\_analyzer",  
> > > > "index\_analyzer" : "str\_index\_analyzer",  
> > > > "omit\_norms": "true",  
> > > > "similarity": "index"  
> > > > },  
> > > > "url": {  
> > > > "type": "string"  
> > > > }  
> > > > }  
> > > > }  
> > > > }'
> > > > 
> > > > and then in my java code, i'm forming query like:-
> > > > 
> > > > String script = "\_score \* (doc['po'].empty ? 1 : doc['po'].value == 0.0  
> > > > ? 1 : doc['po'].value)";  
> > > > QueryBuilder queryBuilder = QueryBuilders.customScoreQuery(  
> > > > QueryBuilders.queryString(quer  
> > > > y)  
> > > > .field("text",30)  
> > > > .field("ad")  
> > > > .field("st")  
> > > > .field("cn")  
> > > > .field("co")
> > > > 
> > > > .defaultOperator(Operator.AND)).script(script);
> > > > 
> > > > Some explanation of fields:  
> > > > text: contains statements like "things to do in goa"  
> > > > ad: address  
> > > > st: state  
> > > > cn: city name  
> > > > co: country
> > > > 
> > > > Now, if I type "things to do in" in my autocompleter box, i'm getting  
> > > > these results:
> > > > 
> > > > things to do in rann  
> > > > things to do in bulandshahr  
> > > > things to do in gondai  
> > > > things to do in rewa  
> > > > things to do in goa
> > > > 
> > > > But I want "things to do in goa" on top.
> > > > 
> > > > Earlier, I thought idf in Elasticsearch is creating problem, So I  
> > > > override the Default similarity and created CustomSimilarity which sets idf  
> > > > to 1. But it's still not solving not my problem. Instead it started giving  
> > > > me results like this:
> > > > 
> > > > things to do in toronto on top.
> > > > 
> > > > I think may be I'm doing something wrong in my index\_analyzer and  
> > > > search\_analyzer. I tried other tokenizers and token filters in different  
> > > > order but not able to get any solution.
> > > > 
> > > > I could have implemented simple prefix autocompleter but that way it  
> > > > doesn't make any sense to use Elasticsearch since searching for terms in  
> > > > between sentences gives user more flexibility. Also, in travel industry a  
> > > > person can search for a particular thing in different manners. like instead  
> > > > of searching for exactly "things to do in" he/she can also wrote "what are  
> > > > the best things to do in" or "what are things to do" and many other  
> > > > possibilities. That way a prefix autocompleter won't work effectively.  
> > > > That's why I tried implementing autocompleter using Elasticsearch but I'm  
> > > > not doing it right way.
> > > > 
> > > > For better results, I also introduced a popularity factor which keeps  
> > > > updating on every user click so that its score keeps increasing in every  
> > > > search using custom score query. Also, giving text field 30% weightage and  
> > > > lesser weightage to other fields. But something is not going right.
> > > > 
> > > > I guess I'm not able to use Elasticsearch capabilities properly for my  
> > > > use case. Can you please help me with this ?
> > > > 
> > > > Thanks
> > > 
> > > --  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > msgid/elasticsearch/3fb42188-c58a-4ab0-bcb8-48c1b075eb71%  
> > > [40googlegroups.com](http://40googlegroups.com).
> > > 
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > 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/d060acb6-eb00-4a35-b707-7d626844f220%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d060acb6-eb00-4a35-b707-7d626844f220%40googlegroups.com)  
> > .
> 
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/CAAVTvp6qKA8mZ51tsFHXbVHQPTeQrZcd8r8NYERQigvMJZvoFA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAAVTvp6qKA8mZ51tsFHXbVHQPTeQrZcd8r8NYERQigvMJZvoFA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:56am UTC](https://discuss.elastic.co/t/how-to-use-elasticsearch-to-implement-autocompleter/15299/6 "2017-07-06T01:56:10Z")

</div>


