# ElasticSearch as a suggestion engine

**URL:** <https://discuss.elastic.co/t/elasticsearch-as-a-suggestion-engine/4457>\
**Category:** Elasticsearch\
**Created:** [May 23, 2011, 12:48pm UTC](https://discuss.elastic.co/t/elasticsearch-as-a-suggestion-engine/4457 "2011-05-23T12:48:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicolas\_Clairon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nicolas_clairon/32/3224_2.png) [@Nicolas\_Clairon](https://discuss.elastic.co/u/Nicolas_Clairon)\
**Post date:** [May 23, 2011, 12:48pm UTC](https://discuss.elastic.co/t/elasticsearch-as-a-suggestion-engine/4457/1 "2011-05-23T12:48:31Z")

</div>

Hi,

I have more than 3 millions of documents and I'd like to use  
ElasticSearch as a as-you-type suggestion engine just like the  
Wikipedia suggest box.

To make long things sort, let's say that my documents are just like  
wikipedia's documents with the following fields :

- title
- aliases
- page with some text

My problem is that I can't make elasticsearch's results relevant.

For instance, and to take some wikipedia example, searching the term  
"news" returns me:

- ABC news
- The NeWS
- "Huey Lewis and the News"
- N.E.W.S"
- News Corporation...

the "News" item is returned later.

Basically, I want it to return the item which match the whole term  
before searching it into sentence.

Something like that :

"^term$" -\> (ie: "News")  
"^term" -\> (ie: "News Corporation")

and then:

"term" -\> (ie: "ABC news, "The NeWS"...)

How can I do that ? I tried many analyzer and query types  
(query\_string, term, fuzzy etc...) without luck.

Any hint and tips whould be very helpful.

Thanks !

N.

---

<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, 4:05am UTC](https://discuss.elastic.co/t/elasticsearch-as-a-suggestion-engine/4457/2 "2017-07-06T04:05:34Z")

</div>


