# Elastic App Search not searching suffix or wrong word

**URL:** https://discuss.elastic.co/t/elastic-app-search-not-searching-suffix-or-wrong-word/287899
**Category:** Elastic Search
**Tags:** elastic-app-search
**Created:** [October 28, 2021, 10:06am UTC](https://discuss.elastic.co/t/elastic-app-search-not-searching-suffix-or-wrong-word/287899 "2021-10-28T10:06:54Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![DILIP\_SHARMA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dilip_sharma/32/42672_2.png) [@DILIP\_SHARMA](https://discuss.elastic.co/u/DILIP_SHARMA)
#### Post date: [October 28, 2021, 10:06am UTC](https://discuss.elastic.co/t/elastic-app-search-not-searching-suffix-or-wrong-word/287899/1 "2021-10-28T10:06:54Z")

</div>

Hi  
i am using elastic app search -7.15.1 in ES Cloud ,  
my test search engine contain following data -

> sun light  
> sunlighting  
> lightsun  
> light  
> sunlight  
> sun

i have below issue here -

**1. if i search light its only return**  
sun light , lightsun , light

**expected result -**  
sun light , lightsun , light ,sunlighting ,sunlight

**2 if i search ligt ( wrong spelling ) then its return**  
sun light , light

**expected result -**  
sun light , lightsun , light ,sunlighting ,sunlight

Please help us in this cases .  
as its should able to search wrong word , as well part of word which suffix in string .

Thanks  
Dilip

---

<div class="post-metadata">

### Author: ![sanderunive](https://avatars.discourse-cdn.com/v4/letter/s/ce73a5/32.png) [@sanderunive](https://discuss.elastic.co/u/sanderunive)
#### Post date: [November 5, 2021, 9:07am UTC](https://discuss.elastic.co/t/elastic-app-search-not-searching-suffix-or-wrong-word/287899/2 "2021-11-05T09:07:53Z")

</div>

Hi Dilip,  
I'm afraid I can't help you out, but maybe my 2 cents might help you in the right direction.

Are you searching through the Query Tester or through API?  
You might already noticed this, but to me it seems:

1. Only results that **start** with light (or after space, so that word also 'starts' with light) are returned. If you use APIcall then maybe look at the type of search to check whether a complete match or also partial match will be returned.
2. Query Tester I don't know, but in API you can specify fuzziness. If you don't set it, it will be on auto. That means based on the lenght of the search term 1 or more characters will be searched fuzzy. Also see documentation link below.  
Default for a 5 character search, like 'light', is 1 fuzzy edit. Since lightsun, sunlighting ,sunlight are more than 6 characters they will not be found with this fuzzy setting. Aditionally sunlighting and sunlight will also not be found because of issue 1 probably. Light and (sun) light are within 1 fuzzy edit of 'ligt' however, and are therefore returned.  
[Common options | Elasticsearch Guide [7.15] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#fuzziness)

Good luck!  
Sander

---

<div class="post-metadata">

### Author: ![JasonStoltz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasonstoltz/32/49893_2.png) [@JasonStoltz](https://discuss.elastic.co/u/JasonStoltz)
#### Post date: [November 5, 2021, 12:32pm UTC](https://discuss.elastic.co/t/elastic-app-search-not-searching-suffix-or-wrong-word/287899/3 "2021-11-05T12:32:37Z")

</div>

Hey [DILIP\_SHARMA](https://discuss.elastic.co/u/DILIP_SHARMA),

App Search will match on prefixes and fuzziness. It won't find _contains_ type matches. It looks at each "term" in individually to determine matches.

sun light - Match - Exact match on the second term.  
sunlighting - No match - No prefix match, and not similar enough for fuzziness.  
lightsun - Match - Prefix match.  
light - Match - Exact match.  
sunlight - No match - No prefix match, and not similar enough for fuzziness.  
sun - Not a match.

You could try adjusting the "Precision tuning" slider on the Relevance Tuning screen. But unfortunately, I think even if you have it entirely tuned for Recall we still won't match on _contains_.

---

<div class="post-metadata">

### Author: ![JasonStoltz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasonstoltz/32/49893_2.png) [@JasonStoltz](https://discuss.elastic.co/u/JasonStoltz)
#### Post date: [November 5, 2021, 1:06pm UTC](https://discuss.elastic.co/t/elastic-app-search-not-searching-suffix-or-wrong-word/287899/4 "2021-11-05T13:06:04Z")

</div>

You might need to resort to creating [Synonyms Guide | Elastic App Search Documentation [7.15] | Elastic](https://www.elastic.co/guide/en/app-search/current/synonyms-guide.html) for cases like this.

---

<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: [December 3, 2021, 1:06pm UTC](https://discuss.elastic.co/t/elastic-app-search-not-searching-suffix-or-wrong-word/287899/5 "2021-12-03T13:06:43Z")

</div>

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