# Full Text, Fuzzy, Partial Search

**URL:** <https://discuss.elastic.co/t/full-text-fuzzy-partial-search/3678>\
**Category:** Elasticsearch\
**Created:** [December 18, 2010, 2:29pm UTC](https://discuss.elastic.co/t/full-text-fuzzy-partial-search/3678 "2010-12-18T14:29:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xeraa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xeraa/32/48181_2.png) [@xeraa](https://discuss.elastic.co/u/xeraa)\
**Post date:** [December 18, 2010, 2:29pm UTC](https://discuss.elastic.co/t/full-text-fuzzy-partial-search/3678/1 "2010-12-18T14:29:25Z")

</div>

Assume the following scenario:

I have three documents, containing the text:

- "Nagelstudio Werner"
- "Nägellabor Meier"
- "Naegeldesign Hoferer"

When searching for "nagel" I'd like to find all three documents, while  
when searching for "nagelstudio" I'd like to find one the first  
document.

What would be the right query for that task (using the Java API)?

I've already tried the following, only having limited success -  
searchTerm holding the text I'm searching for:

- queryBuilder = fuzzyQuery("\_all", searchTerm).minSimilarity(0.1f); -

> Searching for "nagel", only finding "Nägellabor Meier" - matching  
> "nagel" on "meier" with a low factor

- queryBuilder = termQuery("\_all", searchTerm); -\> Not finding "nagel"  
at all, only "nagelstudio"
- queryBuilder =  
fuzzyLikeThisQuery("\_all").likeText(searchTerm).minSimilarity(0.1f); -

> Only finding "meier" again

- queryBuilder = moreLikeThisQuery("\_all").likeText(searchTerm); -\>  
Not finding the expected result for "nagel"
- queryBuilder =  
queryString(searchTerm).field("\_all").fuzzyMinSim(0.1f); -\> Not  
finding the expected result for "nagel"
- queryBuilder = fieldQuery("\_all",  
searchTerm).phraseSlop(1000).fuzzyMinSim(0.1f).lowercaseExpandedTerms(true);  
-\> Not finding the expected result for "nagel"
- queryBuilder =  
fuzzyLikeThisFieldQuery("\_all").likeText(searchTerm).minSimilarity(0.1f);  
-\> Only finding "meier" again

Am I just missing the right method / option for it or is this a  
problem of deeper misunderstanding?

---

<div class="post-metadata">

**Author:** ![lowang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lowang/32/3284_2.png) [@lowang](https://discuss.elastic.co/u/lowang)\
**Post date:** [December 22, 2010, 6:36am UTC](https://discuss.elastic.co/t/full-text-fuzzy-partial-search/3678/2 "2010-12-22T06:36:30Z")

</div>

I'm also interested in this subject, can anyone point out how to do  
error tolerant search ?

---

<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:15am UTC](https://discuss.elastic.co/t/full-text-fuzzy-partial-search/3678/3 "2017-07-06T04:15:01Z")

</div>


