# Completion Suggester - indexing

**URL:** <https://discuss.elastic.co/t/completion-suggester-indexing/74885>\
**Category:** Elasticsearch\
**Created:** [February 13, 2017, 1:07pm UTC](https://discuss.elastic.co/t/completion-suggester-indexing/74885 "2017-02-13T13:07:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigjo](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@bigjo](https://discuss.elastic.co/u/bigjo)\
**Post date:** [February 13, 2017, 1:07pm UTC](https://discuss.elastic.co/t/completion-suggester-indexing/74885/1 "2017-02-13T13:07:14Z")

</div>

Hi there

Could you please help me in the correct direction? I want to achieve the following:

If a user inputs "how do i" as a search query, I want to display **a list of the phrases** or queries that are the most relevant suggestion based on the index, ie "how do i straighten bananas", etc. If more search using a specific query, this query, if the index contains relevant info, be closer to the top.

When indexing I have a whole webpage as input for the suggesions, so the suggestions should be based on the entire web page's content.

When the user starts typing, the completions should be given, so just part of words should trigger suggestions (phrases, or words - all from the index).

Can I just dump the entire body of the html (only the text portion) into a field, and use this field for the suggestion? How do I get the previous searched-context as part of the suggestions?

Any suggestion 😋 would be welcome (actually a list would be preferable)!

---

<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:** [March 13, 2017, 1:07pm UTC](https://discuss.elastic.co/t/completion-suggester-indexing/74885/2 "2017-03-13T13:07:17Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
