# Autocomplete that matches phrase prefix

**URL:** <https://discuss.elastic.co/t/autocomplete-that-matches-phrase-prefix/243318>\
**Category:** Elasticsearch\
**Created:** [July 31, 2020, 7:03am UTC](https://discuss.elastic.co/t/autocomplete-that-matches-phrase-prefix/243318 "2020-07-31T07:03:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![emanu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emanu/32/51479_2.png) [@emanu](https://discuss.elastic.co/u/emanu)\
**Post date:** [July 31, 2020, 7:03am UTC](https://discuss.elastic.co/t/autocomplete-that-matches-phrase-prefix/243318/1 "2020-07-31T07:03:20Z")

</div>

Hello,

I'm trying to achive an autocomplete that will match an exact phrase prefix.

But I don't care where this phrase will be a.k.a in the start of the sentence, in the middle or the end.

For exapmle:

`"Brown f" -> "Quick brown fox", "Brown fox" (But not "fox" or "brown")`

I tried all elastic options:

Search-as-you-type  
Completion Suggester  
Match phrase prefix

The only one that suits for me is "Match phrase prefix".

But the problem is the limit of `max_expansions` (50),  
I can't count on a solution that limits me on any number.

Is there any idea how can I achive a working autocomplete without limits (maybe a twick with completion suggester?)

---

<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:** [August 28, 2020, 7:03am UTC](https://discuss.elastic.co/t/autocomplete-that-matches-phrase-prefix/243318/2 "2020-08-28T07:03:20Z")

</div>

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