Elastic App Search not searching suffix or wrong word

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

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

Good luck!
Sander

Hey 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.

You might need to resort to creating Synonyms Guide | Elastic App Search Documentation [7.15] | Elastic for cases like this.