# Reasonable values for fuzziness, prefix\_length, and max\_expansions

**URL:** https://discuss.elastic.co/t/reasonable-values-for-fuzziness-prefix-length-and-max-expansions/8900
**Category:** Elasticsearch
**Created:** [August 30, 2012, 5:44pm UTC](https://discuss.elastic.co/t/reasonable-values-for-fuzziness-prefix-length-and-max-expansions/8900 "2012-08-30T17:44:21Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![clay\_wardell1](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@clay\_wardell1](https://discuss.elastic.co/u/clay_wardell1)
#### Post date: [August 30, 2012, 5:44pm UTC](https://discuss.elastic.co/t/reasonable-values-for-fuzziness-prefix-length-and-max-expansions/8900/1 "2012-08-30T17:44:21Z")

</div>

I'm trying to implement a business search and I want to allow for misspellings and typos in search queries. I'm sure I will have to tune things by trial and error, but can anyone provide me with reasonable starting points for fuzziness, prefix\_length, and max\_expansions in my TextQueries? All of them seem relevant to the fuzzy matching process.

My index consists of about 300,000 searchable documents. As for query volume, we are trying to launch a website supporting a few thousand users in the short term. I know the values I'm asking about affect performance, so I thought that it might be relevant to give you all an idea of our scale.

Thanks!

Clay

---

<div class="post-metadata">

### Author: ![AEvar\_Arnfjord\_Bjarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aevar_arnfjord_bjarm/32/2746_2.png) [@AEvar\_Arnfjord\_Bjarm](https://discuss.elastic.co/u/AEvar_Arnfjord_Bjarm)
#### Post date: [August 30, 2012, 8:18pm UTC](https://discuss.elastic.co/t/reasonable-values-for-fuzziness-prefix-length-and-max-expansions/8900/2 "2012-08-30T20:18:12Z")

</div>

On Thu, Aug 30, 2012 at 7:44 PM, clay.wardell [clay@blueshiftlocal.com](mailto:clay@blueshiftlocal.com) wrote:

> I'm trying to implement a business search and I want to allow for  
> misspellings and typos in search queries. I'm sure I will have to tune  
> things by trial and error, but can anyone provide me with reasonable  
> starting points for fuzziness, prefix\_length, and max\_expansions in my  
> TextQueries? All of them seem relevant to the fuzzy matching process.
> 
> My index consists of about 300,000 searchable documents. As for query  
> volume, we are trying to launch a website supporting a few thousand users in  
> the short term. I know the values I'm asking about affect performance, so I  
> thought that it might be relevant to give you all an idea of our scale.

Note that the fuzzy queries are quite expensive, I've had much better  
search results (and more performant results) by using nGram tokenizers  
to do fuzzy matches like these.

--

---

<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:14am UTC](https://discuss.elastic.co/t/reasonable-values-for-fuzziness-prefix-length-and-max-expansions/8900/3 "2017-07-06T03:14:30Z")

</div>


